diff mbox

[2/3] Btrfs: fix clone ioctl where range is adjacent to extent

Message ID 1287526932-28369-3-git-send-email-sage@newdream.net
State New, archived
Headers show

Commit Message

Sage Weil Oct. 19, 2010, 10:22 p.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;