summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-03-29 11:42:17 +0300
committerChristian Brauner <brauner@kernel.org>2025-04-07 10:37:17 +0300
commit2992476528aeecbaee17ba0a6396a817481205a3 (patch)
tree551d00d6aa46deeed3151a4ab8a5f47b59f07b25 /include/linux
parent6920e3388ba4c66b0468d43bb7a373f5fff15d35 (diff)
downloadlinux-2992476528aeecbaee17ba0a6396a817481205a3.tar.xz
super: use a common iterator (Part 1)
Use a common iterator for all callbacks. Link: https://lore.kernel.org/r/20250329-work-freeze-v2-4-a47af37ecc3d@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 35b81f497904..5e007bffd00e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3515,7 +3515,11 @@ extern void put_filesystem(struct file_system_type *fs);
extern struct file_system_type *get_fs_type(const char *name);
extern void drop_super(struct super_block *sb);
extern void drop_super_exclusive(struct super_block *sb);
-extern void iterate_supers(void (*)(struct super_block *, void *), void *);
+void __iterate_supers(void (*f)(struct super_block *, void *), void *arg, bool excl);
+static inline void iterate_supers(void (*f)(struct super_block *, void *), void *arg)
+{
+ __iterate_supers(f, arg, false);
+}
extern void iterate_supers_type(struct file_system_type *,
void (*)(struct super_block *, void *), void *);