]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: adjust the write_lock_level as we unlock
authorChris Mason <chris.mason@oracle.com>
Mon, 19 Mar 2012 19:54:38 +0000 (15:54 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 26 Mar 2012 21:04:24 +0000 (17:04 -0400)
commit66b7319db775303cafd5a3a0b378c9d58b452612
tree784c5c878e85a7b8fa283e22767b057d6cfcfa40
parent851a24503e5feb7a3435ce4bbc4b9c0a041ad681
Btrfs: adjust the write_lock_level as we unlock

btrfs_search_slot sometimes needs write locks on high levels of
the tree.  It remembers the highest level that needs a write lock
and will use that for all future searches through the tree in a given
call.

But, very often we'll just cow the top level or the level below and we
won't really need write locks on the root again after that.  This patch
changes things to adjust the write lock requirement as it unlocks
levels.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c