On Tue, 2025-03-18 at 22:33 +0100, Ard Biesheuvel wrote: > On Tue, 18 Mar 2025 at 20:45, James Bottomley > <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > The current iterate_dir() infrastructure is somewhat cumbersome to > > use from within the kernel. Introduce a lighter weight > > simple_iterate_dir() function that directly iterates the directory > > and executes a callback for each positive dentry. > > > > Signed-off-by: James Bottomley > > <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> > > --- > > fs/libfs.c | 33 +++++++++++++++++++++++++++++++++ > > include/linux/fs.h | 2 ++ > > 2 files changed, 35 insertions(+) > > > > diff --git a/fs/libfs.c b/fs/libfs.c > > index 816bfe6c0430..37da5fe25242 100644 > > --- a/fs/libfs.c > > +++ b/fs/libfs.c > > @@ -214,6 +214,39 @@ static void internal_readdir(struct dentry > > *dentry, struct dentry *cursor, > > dput(next); > > } > > > > +/** > > + * generic_iterate_call - iterate all entries executing @callback > > This name doesn't match the name below. Right, I started out thinking the generic_ prefix was the preferred one, but then simple_ looked better and I forgot to update the docbook. Regards, James