btrfs: extent-tree: Add lockdep assert when updating space info
[sfrench/cifs-2.6.git] / fs / btrfs / extent-tree.c
index af73264e33a557a93055efa22453554eadcbf4e1..f37daddbeabeda93836adbe0a568728df5732f9e 100644 (file)
@@ -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;                                        \