]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix inode corruption in nfs_prime_dcache()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 22 Sep 2016 17:38:52 +0000 (13:38 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 27 Sep 2016 18:31:52 +0000 (14:31 -0400)
commitbdb98b7903b2621619a4278f632a8ac8ccc8a30d
tree156b815db4fd3d78958bb3754a57855e02984c11
parent9685b3b22090f84410199c439aaba1db0cb57d4c
NFS: Fix inode corruption in nfs_prime_dcache()

Due to inode number reuse in filesystems, we can end up corrupting the
inode on our client if we apply the file attributes without ensuring that
the filehandle matches.
Typical symptoms include spurious "mode changed" reports in the syslog.

We still do want to ensure that we don't invalidate the dentry if the
inode number matches, but we don't have a filehandle.

Fixes: 47ff5d759504 ("NFS: Don't require a filehandle to refresh...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: stable@vger.kernel.org # v4.0+
Tested-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c