2009/8/25 Sage Weil <sage@xxxxxxxxxxxx>: > Markus, > > This should fix your problem! > It works now , thanks! -Markus > --- > Subject: [PATCH] Btrfs: fix arithmetic error in clone ioctl > > Fix an arithmetic error that was breaking extents cloned via the clone > ioctl starting in the second half of a file. > > Signed-off-by: Sage Weil <sage@xxxxxxxxxxxx> > --- > fs/btrfs/ioctl.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c > index e8e4ebe..63ca12a 100644 > --- a/fs/btrfs/ioctl.c > +++ b/fs/btrfs/ioctl.c > @@ -1072,8 +1072,7 @@ static long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, > datao += off - key.offset; > datal -= off - key.offset; > } > - if (key.offset + datao + datal + key.offset > > - off + len) > + if (key.offset + datao + datal > off + len) > datal = off + len - key.offset - datao; > /* disko == 0 means it's a hole */ > if (!disko) > -- > 1.5.6.5 > > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
