From: Paulo Alcantara <pc@manguebit.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: NeilBrown <neil@brown.name>,
smfrench@gmail.com, David Howells <dhowells@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org
Subject: Re: [PATCH 2/2] smb: client: add support for O_TMPFILE
Date: Wed, 08 Apr 2026 10:48:52 -0300 [thread overview]
Message-ID: <817395109cbfd3cd58203ea300eca8eb@manguebit.org> (raw)
In-Reply-To: <20260408065719.GF3836593@ZenIV>
Al Viro <viro@zeniv.linux.org.uk> writes:
> On Mon, Apr 06, 2026 at 10:28:51PM -0300, Paulo Alcantara wrote:
>
>> IIUC, this is what we currently have
>>
>> * cifs_atomic_open()
>>
>> init state: in-lookup or hashed-negative
>> [d_drop() + d_add()]
>> end state: hashed-positive
>>
>> * cifs_tmpfile()
>>
>> init state: unhashed-negative
>> [d_drop() + d_instantiate()]
>> end state: unhashed-positive
>>
>> * cifs_create()
>>
>> init state: hashed-negative
>> [d_drop() + d_add()]
>> end state: hashed-positive
>
> IDGI. Why shouldn't cifs_create() simply do d_instantiate() instead
> of that dance, ditto for cifs_tmpfile()?
Yes, makes sense. Especially d_drop() for cifs_tmpfile() which is
simply a no-op.
> The only case where you want to change the hashed status is in-lookup
> O_CREAT ->atomic_open(). And there it's not d_drop()+d_add() - it's
> d_splice_alias().
ACK.
> I'd lift that d_drop() out of cifs_do_create() into the callers and
> get rid of it, along with d_add()...
Sounds good. Let me play with it a little bit and, if tests survive,
will send a follow-up patch fixing all that mess.
next prev parent reply other threads:[~2026-04-08 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 21:18 [PATCH 1/2] vfs: introduce d_mark_tmpfile_name() Paulo Alcantara
2026-04-05 21:18 ` [PATCH 2/2] smb: client: add support for O_TMPFILE Paulo Alcantara
2026-04-05 23:32 ` Al Viro
2026-04-05 23:53 ` NeilBrown
2026-04-07 1:28 ` Paulo Alcantara
2026-04-08 6:57 ` Al Viro
2026-04-08 13:48 ` Paulo Alcantara [this message]
2026-04-06 3:23 ` [PATCH 1/2] vfs: introduce d_mark_tmpfile_name() Matthew Wilcox
2026-04-07 1:29 ` Paulo Alcantara
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=817395109cbfd3cd58203ea300eca8eb@manguebit.org \
--to=pc@manguebit.org \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=neil@brown.name \
--cc=smfrench@gmail.com \
--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