mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
NFS: Fix incorrect size revalidation when holding a delegation
We should only care about checking the attributes if the page cache is marked as dubious (using NFS_INO_REVAL_PAGECACHE) and the NFS_INO_REVAL_FORCED flag is set. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
10727772b9
commit
9310b224f2
1 changed files with 4 additions and 1 deletions
|
@ -102,8 +102,11 @@ static int nfs_revalidate_file_size(struct inode *inode, struct file *filp)
|
|||
{
|
||||
struct nfs_server *server = NFS_SERVER(inode);
|
||||
struct nfs_inode *nfsi = NFS_I(inode);
|
||||
const unsigned long force_reval = NFS_INO_REVAL_PAGECACHE|NFS_INO_REVAL_FORCED;
|
||||
unsigned long cache_validity = nfsi->cache_validity;
|
||||
|
||||
if (nfs_have_delegated_attributes(inode))
|
||||
if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ) &&
|
||||
(cache_validity & force_reval) != force_reval)
|
||||
goto out_noreval;
|
||||
|
||||
if (filp->f_flags & O_DIRECT)
|
||||
|
|
Loading…
Add table
Reference in a new issue