The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: NeilBrown <neilb@suse.de>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Amir Goldstein <amir73il@gmail.com>,
	James Clark <james.clark@arm.com>,
	ltp@lists.linux.it, linux-nfs@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] VFS: generate FS_CREATE before FS_OPEN when ->atomic_open used.
Date: Wed, 12 Jun 2024 03:37:48 +0100	[thread overview]
Message-ID: <20240612023748.GG1629371@ZenIV> (raw)
In-Reply-To: <171815791109.14261.10223988071271993465@noble.neil.brown.name>

On Wed, Jun 12, 2024 at 12:05:11PM +1000, NeilBrown wrote:

> For finish_open() there are three cases:
>  - finish_open is used in ->atomic_open handlers.  For these we add a
>    call to fsnotify_open() in do_open() if FMODE_OPENED is set - which
>    means do_dentry_open() has been called. This happens after fsnotify_create().

	Hummm....  There's a bit of behaviour change; in case we fail in
may_open(), we used to get fsnotify_open()+fsnotify_close() and with that
patch we's get fsnotify_close() alone.

	IF we don't care about that, we might as well take fsnotify_open()
out of vfs_open() and, for do_open()/do_tmpfile()/do_o_path(), into
path_openat() itself.  I mean, having
        if (likely(!error)) {
                if (likely(file->f_mode & FMODE_OPENED)) {
			fsnotify_open(file);
                        return file;
		}
in there would be a lot easier to follow...  It would lose fsnotify_open()
in a few more failure exits, but if we don't give a damn about having it
paired with fsnotify_close()...

  reply	other threads:[~2024-06-12  2:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12  2:05 [PATCH] VFS: generate FS_CREATE before FS_OPEN when ->atomic_open used NeilBrown
2024-06-12  2:37 ` Al Viro [this message]
2024-06-12  2:55   ` NeilBrown
2024-06-12  3:14     ` Al Viro
2024-06-12  7:08       ` NeilBrown

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=20240612023748.GG1629371@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=james.clark@arm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=neilb@suse.de \
    /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