]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: do not hold the file extent leaf locked when adding extent item
authorJosef Bacik <jbacik@fusionio.com>
Tue, 25 Sep 2012 19:26:16 +0000 (15:26 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:26:57 +0000 (15:26 -0400)
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>
fs/btrfs/inode.c

index cad0c57c6cc07dfc7fb9581bbde01cadefce452d..50a54b3ef7e678c822acc78ada2c66c4f9369341 100644 (file)
@@ -1823,10 +1823,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);