summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-09-25 15:26:16 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-09 09:15:40 -0400
commitce1953325662fa597197ce728e4195582fc21c8d (patch)
tree2800971063509c668bfda07aafc7d8dd1ab1578b /fs/btrfs
parentde0022b9da616b95ea5b41eab32da825b0b5150f (diff)
downloadlinux-ce1953325662fa597197ce728e4195582fc21c8d.tar.gz
linux-ce1953325662fa597197ce728e4195582fc21c8d.tar.bz2
linux-ce1953325662fa597197ce728e4195582fc21c8d.zip
Btrfs: do not hold the file extent leaf locked when adding extent item
For some reason we unlock everything except the leaf we are on, set the path blocking and then add the extent item for the extent we just finished writing. I can't for the life of me figure out why we would want to do this, and the history doesn't really indicate that there was a real reason for it, so just remove it. This will reduce our tree lock contention on heavy writes. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e355eb0aea1e..d24b65014612 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1822,10 +1822,8 @@ static int insert_reserved_file_extent(struct btrfs_trans_handle *trans,
btrfs_set_file_extent_encryption(leaf, fi, encryption);
btrfs_set_file_extent_other_encoding(leaf, fi, other_encoding);
- btrfs_unlock_up_safe(path, 1);
- btrfs_set_lock_blocking(leaf);
-
btrfs_mark_buffer_dirty(leaf);
+ btrfs_release_path(path);
inode_add_bytes(inode, num_bytes);