forked from Minki/linux
btrfs: extent-tree: Add lockdep assert when updating space info
Just add a safe net for btrfs_space_info member updating. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
cff8267228
commit
0185f364cb
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user