[pnfs] [PATCH 1/8] nfs: fix race in nfs_dirty_request

Fred Isaman iisaman at citi.umich.edu
Thu May 1 09:02:10 EDT 2008


When called from nfs_flush_incompatible, the req is not locked, so
req->wb_page might be set to NULL before it is used by PageWriteback.

Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
---
 fs/nfs/write.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 015e035..656af5f 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -434,7 +434,7 @@ nfs_dirty_request(struct nfs_page *req)
 
 	if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags))
 		return 0;
-	return !PageWriteback(req->wb_page);
+	return !PageWriteback(page);
 }
 
 #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
-- 
1.5.3.3



More information about the pNFS mailing list