All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: viro@zeniv.linux.org.uk, smfrench@gmail.com,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	David Howells <dhowells@redhat.com>,
	linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org
Subject: Re: [PATCH 1/2] vfs: introduce d_mark_tmpfile_name()
Date: Mon, 06 Apr 2026 22:29:30 -0300	[thread overview]
Message-ID: <c5416c58c6fd882500e80f4b30c05c6b@manguebit.org> (raw)
In-Reply-To: <adMnJ_FJ13NJ23Mv@casper.infradead.org>

Matthew Wilcox <willy@infradead.org> writes:

> On Sun, Apr 05, 2026 at 06:18:18PM -0300, Paulo Alcantara wrote:
>> +void d_mark_tmpfile_name(struct file *file, const struct qstr *name)
>> +{
>> +	struct dentry *dentry = file->f_path.dentry;
>> +	char *dname = dentry->d_shortname.string;
>> +
>> +	BUG_ON(dname_external(dentry) ||
>> +	       d_really_is_positive(dentry) ||
>> +	       !d_unlinked(dentry) ||
>> +	       name->len > DNAME_INLINE_LEN - 1);
>
> We tend to prefer each of these to be written out separately.  ie:
>
> 	BUG_ON(dname_external(dentry));
> 	BUG_ON(d_really_is_positive(dentry));
> ...
>
> That way if one triggers, we know which condition is violated.

Makes sense, thanks.  Will fix it in v2.

      reply	other threads:[~2026-04-07  1:29 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
2026-04-06  3:23 ` [PATCH 1/2] vfs: introduce d_mark_tmpfile_name() Matthew Wilcox
2026-04-07  1:29   ` Paulo Alcantara [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=c5416c58c6fd882500e80f4b30c05c6b@manguebit.org \
    --to=pc@manguebit.org \
    --cc=brauner@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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.