diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-10-20 02:28:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:38 -0400 |
commit | b6dff26a08189932eeb0fa4261e09e733b0fc540 (patch) | |
tree | 30f13a24dd60f6e94f9152b12e0931a1ceb16d62 /fs/nfs | |
parent | 575b5c7870c940326a11614e0279b74356c1d44f (diff) |
[PATCH] NFS: Fix oops in nfs_cancel_commit_list
Fix two bugs:
- nfs_inode_remove_request will call nfs_clear_request, so we cannot
reference req->wb_page after it. Move the call to dec_zone_page_state so
that it occurs while req->wb_page is still valid.
- Calling nfs_clear_page_writeback is unnecessary since the radix tree
tags will have been cleared by the call to nfs_inode_remove_request.
Replace with a simple call to nfs_unlock_request.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index ca92ac36fe9d..883dd4a1c157 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -590,10 +590,10 @@ static void nfs_cancel_commit_list(struct list_head *head) | |||
590 | 590 | ||
591 | while(!list_empty(head)) { | 591 | while(!list_empty(head)) { |
592 | req = nfs_list_entry(head->next); | 592 | req = nfs_list_entry(head->next); |
593 | dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); | ||
593 | nfs_list_remove_request(req); | 594 | nfs_list_remove_request(req); |
594 | nfs_inode_remove_request(req); | 595 | nfs_inode_remove_request(req); |
595 | dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); | 596 | nfs_unlock_request(req); |
596 | nfs_clear_page_writeback(req); | ||
597 | } | 597 | } |
598 | } | 598 | } |
599 | 599 | ||