dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Sage Weil 2010-10-29 15:37:33 -04:00 committed by Chris Mason
parent 9a019196ec
commit 050006a753
1 changed files with 1 additions and 1 deletions

View File

@ -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;