Linux filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: NeilBrown <neilb@suse.de>
Cc: Jeff Layton <jlayton@kernel.org>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	Chuck Lever <chuck.lever@oracle.com>,
	Olga Kornievskaia <okorniev@redhat.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH - RFC] VFS: disable new delegations during delegation-breaking operations
Date: Thu, 26 Sep 2024 00:06:40 +0100	[thread overview]
Message-ID: <20240925230640.GN3550746@ZenIV> (raw)
In-Reply-To: <172730412642.17050.14414465745251978669@noble.neil.brown.name>

On Thu, Sep 26, 2024 at 08:42:06AM +1000, NeilBrown wrote:

> I don't think so.
> The old delegated_inode_new will be carried in to vfs_rename() and
> passed to try_break_deleg() which will notice that it is not-NULL and
> will "do the right thing".
> 
> Both _old and _new are initialised to zero at the start of
> do_renameat2(), Both are passed to break_deleg_wait() on the last time
> through the retry_deleg loop which will drop the references - or will
> preserve the reference if it isn't the last time - and both are only set
> by try_break_deleg() which is careful to check if a prior value exists.
> So I think there are no leaks.

Yecchhhh...  What happens if break_deleg() in there returns e.g. -ENOMEM
when try_break_deleg() finds a matching inode?

I'm not even saying it won't work, but it's way too brittle for my taste ;-/

  reply	other threads:[~2024-09-25 23:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16  4:34 [PATCH - RFC] VFS: disable new delegations during delegation-breaking operations NeilBrown
2024-09-25  8:56 ` Christian Brauner
2024-09-25 22:19 ` Al Viro
2024-09-25 22:42   ` NeilBrown
2024-09-25 23:06     ` Al Viro [this message]
2024-09-25 23:46       ` NeilBrown
2024-09-30 14:04 ` Jeff Layton
2024-09-30 14:15   ` Chuck Lever III

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=20240925230640.GN3550746@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox