diff options
author | Qu Wenruo <wqu@suse.com> | 2019-04-29 14:03:32 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-01 13:34:58 +0200 |
commit | 0185f364cb65855cdf5dfd0de11f8f9622940250 (patch) | |
tree | f9441b78317594af663f11c85ebb6a03a8b0bd21 /fs/btrfs | |
parent | cff8267228c14e56ded8407787d4328603423b3e (diff) |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index af73264e33a5..f37daddbeabe 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -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; \ |