]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
libfs: export find_next_child()
authorChristian Brauner <brauner@kernel.org>
Mon, 31 Mar 2025 12:42:11 +0000 (14:42 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 9 May 2025 10:41:23 +0000 (12:41 +0200)
Export find_next_child() so it can be used by efivarfs.
Keep it internal for now. There's no reason to advertise this
kernel-wide.

Link: https://lore.kernel.org/r/20250331-work-freeze-v1-1-6dfbe8253b9f@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/internal.h
fs/libfs.c

index b9b3e29a73fd8ca5d965f4b267910041dde9a5ec..b9949707a152aaa31920d163a7338580e976c12c 100644 (file)
@@ -343,3 +343,4 @@ static inline bool path_mounted(const struct path *path)
 void file_f_owner_release(struct file *file);
 bool file_seek_cur_needs_f_lock(struct file *file);
 int statmount_mnt_idmap(struct mnt_idmap *idmap, struct seq_file *seq, bool uid_map);
+struct dentry *find_next_child(struct dentry *parent, struct dentry *prev);
index 6393d7c49ee6e664188fd0e2b405f7c30c1105d2..f2ef377d266534b6f1f9598872168d9ee041e1c5 100644 (file)
@@ -583,7 +583,7 @@ const struct file_operations simple_offset_dir_operations = {
        .fsync          = noop_fsync,
 };
 
-static struct dentry *find_next_child(struct dentry *parent, struct dentry *prev)
+struct dentry *find_next_child(struct dentry *parent, struct dentry *prev)
 {
        struct dentry *child = NULL, *d;
 
@@ -603,6 +603,7 @@ static struct dentry *find_next_child(struct dentry *parent, struct dentry *prev
        dput(prev);
        return child;
 }
+EXPORT_SYMBOL(find_next_child);
 
 void simple_recursive_removal(struct dentry *dentry,
                               void (*callback)(struct dentry *))