aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFred Isaman <iisaman@citi.umich.edu>2008-05-01 13:03:22 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-05-16 12:43:23 -0400
commit38def50fabc479dc96ea6bd2cb2526e0dfc36fa4 (patch)
treec7327131526e59b35f639af91dbea3075b20445e /fs
parentb0b539739fe9b7d75002412a787cfdf4efddbc33 (diff)
nfs: fix race in nfs_dirty_request
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@citi.umich.edu> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 1ade11d1ba07..6d8ace3e3259 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -415,7 +415,7 @@ nfs_dirty_request(struct nfs_page *req)
415 415
416 if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags)) 416 if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags))
417 return 0; 417 return 0;
418 return !PageWriteback(req->wb_page); 418 return !PageWriteback(page);
419} 419}
420 420
421#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 421#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)