]> 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)
commitc89cee0677163bd825ec48cb0152a6b9ad217049
tree784c5c878e85a7b8fa283e22767b057d6cfcfa40
parent8a0948dfe3ffe5bb79d109849c9e8c570e1042e1
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