提交 0185f364 编写于 作者: Q Qu Wenruo 提交者: David Sterba

btrfs: extent-tree: Add lockdep assert when updating space info

Just add a safe net for btrfs_space_info member updating.
Signed-off-by: NQu Wenruo <wqu@suse.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 cff82672
......@@ -58,6 +58,7 @@ enum {
static inline void update_##name(struct btrfs_space_info *sinfo, \
s64 bytes) \
{ \
lockdep_assert_held(&sinfo->lock); \
if (bytes < 0 && sinfo->name < -bytes) { \
WARN_ON(1); \
sinfo->name = 0; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册