summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/subvolume_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-21 20:16:23 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-31 20:36:11 -0400
commit63332394c7e1f4f26e8e5b1387212016aaa7eae2 (patch)
tree0edf5feb41cb95963f6b65f7f8abf7c14910a1df /fs/bcachefs/subvolume_types.h
parentaa6e130e3c2965a5c26a4033ff63b5dc9549bd76 (diff)
downloadlinux-stable-63332394c7e1f4f26e8e5b1387212016aaa7eae2.tar.gz
linux-stable-63332394c7e1f4f26e8e5b1387212016aaa7eae2.tar.bz2
linux-stable-63332394c7e1f4f26e8e5b1387212016aaa7eae2.zip
bcachefs: Move snapshot table size to struct snapshot_table
We need to add bounds checking for snapshot table accesses - it turns out there are cases where we do need to use the snapshots table before fsck checks have completed (and indeed, fsck may not have been run). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/subvolume_types.h')
-rw-r--r--fs/bcachefs/subvolume_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume_types.h b/fs/bcachefs/subvolume_types.h
index ae644adfc391..9b10c8947828 100644
--- a/fs/bcachefs/subvolume_types.h
+++ b/fs/bcachefs/subvolume_types.h
@@ -20,6 +20,8 @@ struct snapshot_t {
};
struct snapshot_table {
+ struct rcu_head rcu;
+ size_t nr;
#ifndef RUST_BINDGEN
DECLARE_FLEX_ARRAY(struct snapshot_t, s);
#else