All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Hugh Dickens <hughd@google.com>,
	Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	yukuai3@huawei.com, yangerkun@huaweicloud.com
Subject: Re: [PATCH v4 5/5] libfs: Use d_children list to iterate simple_offset directories
Date: Sat, 14 Dec 2024 19:59:13 +0000	[thread overview]
Message-ID: <20241214195913.GB1977892@ZenIV> (raw)
In-Reply-To: <99addf69-4757-4eb9-b6d1-e554a72070c3@oracle.com>

On Sat, Dec 14, 2024 at 02:22:41PM -0500, Chuck Lever wrote:
> On 12/14/24 12:49 PM, Al Viro wrote:
> > On Sat, Dec 14, 2024 at 12:13:30PM -0500, Chuck Lever wrote:
> > > > > +/* Cf. find_next_child() */
> > > > > +static struct dentry *find_next_sibling_locked(struct dentry *parent,
> > > > > +                           struct dentry *dentry)
> > > > 
> > > > There might be a better name for this function.
> > 
> > There might be better calling conventions for it, TBH.
> > AFAICS, all callers are directly surrounded by grabbing/releasing
> > ->d_lock on parent.  Why not fold that in, and to hell with any
> > mentionings of "locked" in the name...
> 
> I've tried it both ways, couldn't make up my mind. I'll try it again.

Single return there, so it's just a single spin_lock() on entry and
spin_unlock() on exit...  No idea if it'll make coverity any happier,
but it would be easier on human readers.

  reply	other threads:[~2024-12-14 19:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 15:52 [PATCH v4 0/5] Improve simple directory offset wrap behavior cel
2024-12-04 15:52 ` [PATCH v4 1/5] libfs: Return ENOSPC when the directory offset range is exhausted cel
2024-12-04 15:52 ` [PATCH v4 2/5] Revert "libfs: Add simple_offset_empty()" cel
2024-12-04 15:52 ` [PATCH v4 3/5] Revert "libfs: fix infinite directory reads for offset dir" cel
2024-12-04 15:52 ` [PATCH v4 4/5] libfs: Replace simple_offset end-of-directory detection cel
2024-12-04 15:52 ` [PATCH v4 5/5] libfs: Use d_children list to iterate simple_offset directories cel
2024-12-08 17:11   ` Chuck Lever
2024-12-14 17:13     ` Chuck Lever
2024-12-14 17:49       ` Al Viro
2024-12-14 19:22         ` Chuck Lever
2024-12-14 19:59           ` Al Viro [this message]
2024-12-05 17:09 ` [PATCH v4 0/5] Improve simple directory offset wrap behavior Christian Brauner
2024-12-05 22:16 ` Chuck Lever

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=20241214195913.GB1977892@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=hughd@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yangerkun@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.