Message ID | 1424658805.4278.13.camel@primarydata.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 9b0c55cb2a2e..1e80dc1716b1 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -485,10 +485,14 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) if (!status) nfs_setsecurity(dentry->d_inode, entry->fattr, entry->label); goto out; - } else { - d_invalidate(dentry); - dput(dentry); } + /* Is this a submount? If so, ignore. */ + if (IS_ROOT(dentry) || + !nfs_fsid_equal(&NFS_SB(dentry->d_sb)->fsid, + &entry->fattr->fsid)) + goto out; + d_invalidate(dentry); + dput(dentry); } dentry = d_alloc(parent, &filename);