Re: kernel BUG in fs/dcache.c running nfs

Al Viro
2014-09-26T23:08:05Z

On Wed, Sep 10, 2014 at 01:57:39PM +1000, NeilBrown wrote:

> The d_drop();d_add(); pattern is used a number of times in NFS, but what I
> didn't notice before is that it is only used if ->d_inode is NULL.

And the point of that "pattern" would be...? If dentry is already negative
and hashed, it does nothing whatsoever. If it is negative and unhashed,
d_drop() is a no-op, obviously. And if it's positive, we get a nice
shiny oops.

Where are we doing anything of that sort, anyway? I see a bloody odd
instance in nfs_atomic_open() and that's it. Note that nfs_instantiate()
is different (and not necessary nice - that d_drop() in case when this
sucker is called from mkdir() is asking for races with mount()). How
do we get a positive hashed dentry there, anyway?