From: Al Viro <viro@zeniv.linux.org.uk>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: buggered I_CREATING implementation?
Date: Thu, 11 Sep 2025 17:05:48 +0100 [thread overview]
Message-ID: <20250911160548.GV39973@ZenIV> (raw)
In-Reply-To: <lsqpkeiqraemymog6l5msgx3x4nczbyxg55ffelntnzp43grop@bdk6ezmz5wg5>
On Thu, Sep 11, 2025 at 05:15:47PM +0200, Mateusz Guzik wrote:
> So as far as I understand the intent was to make it so that discarded
> inodes can be tested for with:
> (inode->i_state & (I_NEW | I_CREATING) == I_CREATING)
It is not the intent. The problem is dealing with incoming fhandle that
has guessed the inumber of freshly created (and not yet linked) inode.
> This means another call for the same inode will find it and:
>
> if (unlikely(old->i_state & I_CREATING)) {
> spin_unlock(&old->i_lock);
> spin_unlock(&inode_hash_lock);
> return -EBUSY;
> }
>
> ... return with -EBUSY instead of waiting to check what will happen with it.
What's there to wait for?
prev parent reply other threads:[~2025-09-11 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 15:15 buggered I_CREATING implementation? Mateusz Guzik
2025-09-11 16:05 ` Al Viro [this message]
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=20250911160548.GV39973@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.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