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:57:28 +0000 (18:57 -0700)
commit98d9b492bea9a998d8dcbf0f0ff0577ef9343ebd
tree6ec0664c5dbf056a955cdbd975a183d0e9c47acd
parent4f662095c1b2d640a7a71ad9e32f230735b7f851
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