* [PATCH] nfs: Fix cache_validity check in nfs_write_pageuptodate()
@ 2014-06-20 12:44 Scott Mayhew
0 siblings, 0 replies; only message in thread
From: Scott Mayhew @ 2014-06-20 12:44 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs
NFS_INO_INVALID_DATA cannot be ignored, even if we have a delegation.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
fs/nfs/write.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 3ee5af4..98ff061 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -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;
}
--
1.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-20 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 12:44 [PATCH] nfs: Fix cache_validity check in nfs_write_pageuptodate() Scott Mayhew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox