提交 f9ddfd05 编写于 作者: L Liu Bo 提交者: David Sterba

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: NQu Wenruo <wqu@suse.com>
Signed-off-by: NLiu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 d80bb3f9
...@@ -2619,8 +2619,11 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root, ...@@ -2619,8 +2619,11 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root,
level = btrfs_header_level(b); level = btrfs_header_level(b);
if (p->need_commit_sem) if (p->need_commit_sem)
up_read(&fs_info->commit_root_sem); up_read(&fs_info->commit_root_sem);
if (!p->skip_locking) /*
btrfs_tree_read_lock(b); * Ensure that all callers have set skip_locking when
* p->search_commit_root = 1.
*/
ASSERT(p->skip_locking == 1);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册