diff mbox series

[07/18] btrfs-progs: add accounting_lock to btrfs_root

Message ID 0aae3e1c47df23420ca83ff78fd261dd819bd2ef.1681939316.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: more prep work for syncing ctree.c | expand

Commit Message

Josef Bacik April 19, 2023, 9:23 p.m. UTC
This is used to protect the used count for btrfs_root in the kernel,
sync it to btrfs-progs to allow us to sync ctree.c into btrfs-progs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 kernel-shared/ctree.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h
index 26171288..50f97533 100644
--- a/kernel-shared/ctree.h
+++ b/kernel-shared/ctree.h
@@ -479,6 +479,8 @@  struct btrfs_root {
 	/* the dirty list is only used by non-reference counted roots */
 	struct list_head dirty_list;
 	struct rb_node rb_node;
+
+	spinlock_t accounting_lock;
 };
 
 static inline u64 btrfs_root_id(const struct btrfs_root *root)