diff mbox

Btrfs: fix clone ioctl where range is adjacent to extent

Message ID 5a425001257ed650ef26779a9ce419860fc163e9.1285113216.git.yehuda@hq.newdream.net (mailing list archive)
State New, archived
Headers show

Commit Message

Yehuda Sadeh Sept. 22, 2010, 12:02 a.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3471b22..f4a3dde 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1607,7 +1607,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;