[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140117212655.GE26636@fieldses.org>
Date: Fri, 17 Jan 2014 16:26:55 -0500
From: "J. Bruce Fields" <bfields@...ldses.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Al Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org,
Miklos Szeredi <mszeredi@...e.cz>
Subject: Re: [PATCH] dcache: fix d_splice_alias handling of aliases
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists