public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nfs@vger.kernel.org, Miklos Szeredi <mszeredi@suse.cz>
Subject: Re: [PATCH] dcache: fix d_splice_alias handling of aliases
Date: Fri, 17 Jan 2014 16:26:55 -0500	[thread overview]
Message-ID: <20140117212655.GE26636@fieldses.org> (raw)
In-Reply-To: <20140117210343.GD26636@fieldses.org>

On Fri, Jan 17, 2014 at 04:03:43PM -0500, J. Bruce Fields wrote:
> 	- d_splice_alias handles inode == NULL in the same way,

Actually, not exactly; simplifying a bit, in the NULL case they do:

	d_splice_alias:

		__d_instantiate(dentry, NULL);
		security_d_instantiate(dentry, NULL);
		if (d_unhashed(dentry))
			d_rehash(dentry);

	d_materialise_unique:

		BUG_ON(!d_unhashed(dentry));

		 __d_instantiate(dentry, NULL);
		 d_rehash(dentry);
		 security_d_instantiate(dentry, NULL);

and a comment on d_splice_alias says

	Cluster filesystems may call this function with a negative,
	hashed dentry.  In that case, we know that the inode will be a
	regular file, and also this will only occur during atomic_open.

I don't understand those callers.  But I guess it would be easy enough
to handle in d_materialise_unique.

--b.

  reply	other threads:[~2014-01-17 21:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 15:17 [PATCH] dcache: fix d_splice_alias handling of aliases J. Bruce Fields
2014-01-15 17:34 ` Miklos Szeredi
2014-01-15 17:57   ` J. Bruce Fields
2014-01-15 18:25     ` Miklos Szeredi
2014-01-16 15:41       ` J. Bruce Fields
2014-01-16 16:13         ` Miklos Szeredi
2014-01-16 16:10 ` J. Bruce Fields
2014-01-16 16:15   ` Steven Whitehouse
2014-01-16 16:44     ` J. Bruce Fields
2014-01-16 16:54       ` Bob Peterson
2014-01-16 18:51         ` J. Bruce Fields
2014-01-17 10:04           ` Steven Whitehouse
2014-01-17 18:04             ` J. Bruce Fields
2014-01-17 12:17 ` Christoph Hellwig
2014-01-17 15:39   ` J. Bruce Fields
2014-01-17 21:03     ` J. Bruce Fields
2014-01-17 21:26       ` J. Bruce Fields [this message]
2014-01-23 21:27         ` [PATCH] dcache: make d_splice_alias use d_materialise_unique J. Bruce Fields
2014-01-31 18:42           ` Al Viro
2014-01-31 19:47             ` J. Bruce Fields
2014-02-06 17:03               ` J. Bruce Fields

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=20140117212655.GE26636@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mszeredi@suse.cz \
    --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