Trond Myklebust 6c441c254e NFS: Don't invalidate a submounted dentry in nfs_prime_dcache()
If we're traversing a directory which contains a submounted filesystem,
or one that has a referral, the NFS server that is processing the READDIR
request will often return information for the underlying (mounted-on)
directory. It may, or may not, also return filehandle information.

If this happens, and the lookup in nfs_prime_dcache() returns the
dentry for the submounted directory, the filehandle comparison will
fail, and we call d_invalidate(). Post-commit 8ed936b5671bf
("vfs: Lazily remove mounts on unlinked files and directories."), this
means the entire subtree is unmounted.

The following minimal patch addresses this problem by punting on
the invalidation if there is a submount.

Kudos to Neil Brown <neilb@suse.de> for having tracked down this
issue (see link).

Reported-by: Nix <nix@esperi.org.uk>
Link: http://lkml.kernel.org/r/87iofju9ht.fsf@spindle.srvr.nix
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2015-03-01 23:23:06 -05:00
..
2013-06-08 16:20:18 -04:00
2015-02-18 07:28:37 -08:00
2012-07-30 19:06:41 -04:00
2015-02-03 11:06:34 -08:00
2015-02-03 16:01:27 -05:00
2015-02-03 16:01:27 -05:00
2014-11-25 16:38:32 -05:00
2015-02-18 12:28:50 -08:00
2015-02-11 17:14:54 -08:00
2014-11-25 16:38:32 -05:00
2014-11-25 16:38:32 -05:00
2014-11-25 16:38:32 -05:00
2012-07-30 19:06:52 -04:00
2015-01-30 20:43:30 -05:00
2015-02-11 17:14:54 -08:00
2015-02-10 08:41:23 -05:00