diff options
author | Liu Bo <bo.liu@linux.alibaba.com> | 2018-05-29 09:27:06 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-30 10:46:52 -0400 |
commit | f9ddfd0592acf9bf01814e7d1d60134af7fd0a4d (patch) | |
tree | 6fb7e3b5b6e37793cd6fc97a8858128d06bd82f7 | |
parent | d80bb3f905ccf70b2c4dde541cff7286e6f936e8 (diff) |
Btrfs: remove unused check of skip_locking
The check is superfluous since all callers who set search_for_commit
also have skip_locking set.
ASSERT() is put in place to ensure skip_locking is set by new callers.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ctree.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 973912ec8992..4bc326df472e 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -2619,8 +2619,11 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root, | |||
2619 | level = btrfs_header_level(b); | 2619 | level = btrfs_header_level(b); |
2620 | if (p->need_commit_sem) | 2620 | if (p->need_commit_sem) |
2621 | up_read(&fs_info->commit_root_sem); | 2621 | up_read(&fs_info->commit_root_sem); |
2622 | if (!p->skip_locking) | 2622 | /* |
2623 | btrfs_tree_read_lock(b); | 2623 | * Ensure that all callers have set skip_locking when |
2624 | * p->search_commit_root = 1. | ||
2625 | */ | ||
2626 | ASSERT(p->skip_locking == 1); | ||
2624 | 2627 | ||
2625 | goto out; | 2628 | goto out; |
2626 | } | 2629 | } |