Commit b4d2314bb88b07e5a04e6c75b442a1dfcd60e340
1 parent
49697ee792
Exists in
master
and in
39 other branches
NFSv4: Don't ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode()
If the NFS_INO_REVAL_FORCED flag is set, that means that we don't yet have an up to date attribute cache. Even if we hold a delegation, we must put a GETATTR on the wire. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
Showing 3 changed files with 8 additions and 2 deletions Side-by-side Diff
fs/nfs/delegation.h
fs/nfs/dir.c
... | ... | @@ -1789,7 +1789,7 @@ |
1789 | 1789 | cache = nfs_access_search_rbtree(inode, cred); |
1790 | 1790 | if (cache == NULL) |
1791 | 1791 | goto out; |
1792 | - if (!nfs_have_delegation(inode, FMODE_READ) && | |
1792 | + if (!nfs_have_delegated_attributes(inode) && | |
1793 | 1793 | !time_in_range_open(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo)) |
1794 | 1794 | goto out_stale; |
1795 | 1795 | res->jiffies = cache->jiffies; |
fs/nfs/inode.c
... | ... | @@ -729,7 +729,7 @@ |
729 | 729 | { |
730 | 730 | struct nfs_inode *nfsi = NFS_I(inode); |
731 | 731 | |
732 | - if (nfs_have_delegation(inode, FMODE_READ)) | |
732 | + if (nfs_have_delegated_attributes(inode)) | |
733 | 733 | return 0; |
734 | 734 | return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); |
735 | 735 | } |