nfs: Fix cache_validity check in nfs_write_pageuptodate()
Subsystems (2)
PATCH 1/1 nfs: Fix cache_validity check in nfs_write_pageuptodate()
NFS_INO_INVALID_DATA cannot be ignored, even if we have a delegation.
Signed-off-by Scott Mayhew <[email protected]>
--- fs/nfs/write.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfs/write.c +3 -1
@@ -934,12 +934,14 @@ static bool nfs_write_pageuptodate(struct page *page, struct inode *inode)if (nfs_have_delegated_attributes (inode)) goto out; -if (nfsi->cache_validity & (NFS_INO_INVALID_DATA |NFS_INO_REVAL_PAGECACHE )) +if (nfsi->cache_validity &NFS_INO_REVAL_PAGECACHE )return false;smp_rmb ();if (test_bit (NFS_INO_INVALIDATING , &nfsi->flags))return false; out: +if (nfsi->cache_validity &NFS_INO_INVALID_DATA ) +return false;return PageUptodate (page) !=0 ; }
Signature · 1 line
1.9.3