diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2009-11-12 04:34:08 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-12-15 21:24:52 -0500 |
commit | 920bbbfb05c9fce22e088d20eb9dcb8f96342de9 (patch) | |
tree | b972b3f39ebefb9c026300c1981d18cad769e431 /fs/btrfs/ioctl.c | |
parent | ad48fd754676bfae4139be1a897b1ea58f9aaf21 (diff) |
Btrfs: Rewrite btrfs_drop_extents
Rewrite btrfs_drop_extents by using btrfs_duplicate_item, so we can
avoid calling lock_extent within transaction.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | 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 cdbb054102b9..a1a8db8c149d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1027,8 +1027,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
1027 | BUG_ON(!trans); | 1027 | BUG_ON(!trans); |
1028 | 1028 | ||
1029 | /* punch hole in destination first */ | 1029 | /* punch hole in destination first */ |
1030 | btrfs_drop_extents(trans, root, inode, off, off + len, | 1030 | btrfs_drop_extents(trans, inode, off, off + len, &hint_byte, 1); |
1031 | off + len, 0, &hint_byte, 1); | ||
1032 | 1031 | ||
1033 | /* clone data */ | 1032 | /* clone data */ |
1034 | key.objectid = src->i_ino; | 1033 | key.objectid = src->i_ino; |