diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-08-20 11:46:02 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:12:16 +0200 |
commit | fd7ba1c1202d15ac96d7b42256550973e12686b5 (patch) | |
tree | 6ea6087396bc97686ad5f3895d02e1bf3e67be78 /fs/btrfs/ctree.c | |
parent | 51899412dd95b2d9f50297c527b22ada3da0000c (diff) |
btrfs: add nesting tags to the locking helpers
We will need these when we switch to an rwsem, so plumb in the
infrastructure here to use later on. I violate the 80 character limit
some here because it'll be cleaned up later.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 7c99bf112960..71e3fa30082c 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2875,7 +2875,8 @@ cow_done: } else { if (!btrfs_tree_read_lock_atomic(b)) { btrfs_set_path_blocking(p); - __btrfs_tree_read_lock(b, p->recurse); + __btrfs_tree_read_lock(b, BTRFS_NESTING_NORMAL, + p->recurse); } p->locks[level] = BTRFS_READ_LOCK; } @@ -5453,7 +5454,9 @@ again: } if (!ret) { btrfs_set_path_blocking(path); - __btrfs_tree_read_lock(next, path->recurse); + __btrfs_tree_read_lock(next, + BTRFS_NESTING_NORMAL, + path->recurse); } next_rw_lock = BTRFS_READ_LOCK; } @@ -5488,7 +5491,9 @@ again: ret = btrfs_try_tree_read_lock(next); if (!ret) { btrfs_set_path_blocking(path); - __btrfs_tree_read_lock(next, path->recurse); + __btrfs_tree_read_lock(next, + BTRFS_NESTING_NORMAL, + path->recurse); } next_rw_lock = BTRFS_READ_LOCK; } |