summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-10-29 21:37:33 +0200
committerChris Mason <chris.mason@oracle.com>2010-10-29 21:37:33 +0200
commit050006a753bab8ba05f2113cc57ba49398cd5521 (patch)
tree43b8bdc0ce9f76d2726096dbfbc72a04c141afa6 /fs/btrfs/ioctl.c
parentBtrfs: fix delalloc checks in clone ioctl (diff)
downloadlinux-050006a753bab8ba05f2113cc57ba49398cd5521.tar.xz
linux-050006a753bab8ba05f2113cc57ba49398cd5521.zip
Btrfs: fix clone ioctl where range is adjacent to extent
We had an edge case issue where the requested range was just following an existing extent. Instead of skipping to the next extent, we used the previous one which lead to having zero sized extents. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d94bef5179fc..3fe15e435b5c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1597,7 +1597,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
}
btrfs_release_path(root, path);
- if (key.offset + datal < off ||
+ if (key.offset + datal <= off ||
key.offset >= off+len)
goto next;