diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-06-20 13:16:38 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-06-24 18:46:57 -0400 |
commit | f2467b6f64da7d8446211c21f6fcd8fa10e8d948 (patch) | |
tree | 5f441ebc910cccc4994542a945de959d88eb277d /fs | |
parent | 18dd78c427513fb0f89365138be66e6ee8700d1b (diff) |
NFS: Clear NFS_INO_REVAL_PAGECACHE when we update the file size
In nfs_update_inode(), if the change attribute is seen to change on
the server, then we set NFS_INO_REVAL_PAGECACHE in order to make
sure that we check the file size.
However, if we also update the file size in the same function, we
don't need to check it again. So make sure that we clear the
NFS_INO_REVAL_PAGECACHE that was set earlier.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index c496f8a74639..51dda21ebc4e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1601,6 +1601,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1601 | if ((nfsi->npages == 0) || new_isize > cur_isize) { | 1601 | if ((nfsi->npages == 0) || new_isize > cur_isize) { |
1602 | i_size_write(inode, new_isize); | 1602 | i_size_write(inode, new_isize); |
1603 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; | 1603 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; |
1604 | invalid &= ~NFS_INO_REVAL_PAGECACHE; | ||
1604 | } | 1605 | } |
1605 | dprintk("NFS: isize change on server for file %s/%ld " | 1606 | dprintk("NFS: isize change on server for file %s/%ld " |
1606 | "(%Ld to %Ld)\n", | 1607 | "(%Ld to %Ld)\n", |