aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-02-10 18:20:48 +0000
committerMark Brown <broonie@kernel.org>2016-02-10 18:20:48 +0000
commit0e770f4e70e8221454854b962adc258b6035ecdd (patch)
treedb146cb0453047b334e6cc882fda74fd7cba3525 /fs/nfs/inode.c
parenta69ce65274ff1589bb64ea782a4178d7210da0bb (diff)
parentcd6f5814252060db2d38f57c602db33696c549c0 (diff)
Merge branch 'linux-linaro-lsk-v3.10' into linux-linaro-lsk-v3.10-androidlsk-v3.10-16.02-android
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index e2bb3012d025..9de39760abf4 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1503,7 +1503,11 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
nfsi->attrtimeo_timestamp = now;
}
}
- invalid &= ~NFS_INO_INVALID_ATTR;
+
+ /* Don't declare attrcache up to date if there were no attrs! */
+ if (fattr->valid != 0)
+ invalid &= ~NFS_INO_INVALID_ATTR;
+
/* Don't invalidate the data if we were to blame */
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
|| S_ISLNK(inode->i_mode)))