]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce BTRFS_NESTING_LEFT/RIGHT_COW
authorJosef Bacik <josef@toxicpanda.com>
Thu, 20 Aug 2020 15:46:05 +0000 (11:46 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:16 +0000 (12:12 +0200)
commit884590d58efc8dfd9df7666320ffbb5ae72a0a99
treec77e328755674e909fede6da8bca28748b6584b1
parente30e2a8776a51403dd02549976ef560922adca03
btrfs: introduce BTRFS_NESTING_LEFT/RIGHT_COW

For similar reasons as BTRFS_NESTING_COW, we need
BTRFS_NESTING_LEFT/RIGHT_COW.  The pattern is this

lock leaf -> BTRFS_NESTING_NORMAL
  cow leaf -> BTRFS_NESTING_COW
    split leaf
      lock left -> BTRFS_NESTING_LEFT
        cow left -> BTRFS_NESTING_LEFT_COW

We need this in order to indicate to lockdep that these locks are
discrete and are being taken in a safe order.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/locking.h