From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [RFC PATCH 2/3] libfs: add simple directory iteration function with callback
Date: Tue, 18 Mar 2025 17:50:51 -0400 [thread overview]
Message-ID: <8145eb82476edd40c6d168e14db9f16939efb8bb.camel@HansenPartnership.com> (raw)
In-Reply-To: <CAMj1kXHZfABW6JyPgHDHm-wDX0Orbhs8v=Y1vrboQh2ra1opFQ@mail.gmail.com>
On Tue, 2025-03-18 at 22:33 +0100, Ard Biesheuvel wrote:
> On Tue, 18 Mar 2025 at 20:45, James Bottomley
> <James.Bottomley@hansenpartnership.com> 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@HansenPartnership.com>
> > ---
> > 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
next prev parent reply other threads:[~2025-03-18 21:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 19:41 [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it James Bottomley
2025-03-18 19:41 ` [RFC PATCH 1/3] libfs: rework dcache_readdir to use an internal function with callback James Bottomley
2025-03-18 21:32 ` Ard Biesheuvel
2025-03-18 21:49 ` James Bottomley
2025-03-18 19:41 ` [RFC PATCH 2/3] libfs: add simple directory iteration " James Bottomley
2025-03-18 21:33 ` Ard Biesheuvel
2025-03-18 21:50 ` James Bottomley [this message]
2025-03-18 19:41 ` [RFC PATCH 3/3] efivarfs: replace iterate_dir with libfs function simple_iterate_call James Bottomley
2025-03-18 21:34 ` Ard Biesheuvel
2025-03-18 23:45 ` [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it Al Viro
2025-03-18 23:49 ` Al Viro
2025-03-19 16:46 ` James Bottomley
2025-03-19 18:45 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8145eb82476edd40c6d168e14db9f16939efb8bb.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=ardb@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox