NFS: Don't declare inode uptodate unless all attributes were checked
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 15 Apr 2014 14:07:57 +0000 (10:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:54:14 +0000 (18:54 -0700)
commit4b331d38a2add7b27ea44d26d9146ad1aabcbaab
treef03f624019bc999cdf86fc32f6b3a526f9f75a16
parent32cf2fba27303e95f944f6452e42648297fc8b51
NFS: Don't declare inode uptodate unless all attributes were checked

commit 43b6535e717d2f656f71d9bd16022136b781c934 upstream.

Fix a bug, whereby nfs_update_inode() was declaring the inode to be
up to date despite not having checked all the attributes.
The bug occurs because the temporary variable in which we cache
the validity information is 'sanitised' before reapplying to
nfsi->cache_validity.

Reported-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/inode.c