Skip to content

Commit

Permalink
nfs: fix race in nfs_dirty_request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed May 16, 2008
1 parent b0b5397 commit 38def50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,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)
Expand Down

0 comments on commit 38def50

Please sign in to comment.