Skip to content

Commit

Permalink
NFS: Fix a list corruption problem
Browse files Browse the repository at this point in the history
We must remove the request from whatever list it is currently on before we
can add it to the dirty list.

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Apr 15, 2007
1 parent 0492c37 commit eb4cac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ static int nfs_page_mark_flush(struct page *page)
spin_lock(req_lock);
}
spin_unlock(req_lock);
if (nfs_set_page_writeback(page) == 0)
if (nfs_set_page_writeback(page) == 0) {
nfs_list_remove_request(req);
nfs_mark_request_dirty(req);
}
ret = test_bit(PG_NEED_FLUSH, &req->wb_flags);
nfs_unlock_request(req);
return ret;
Expand Down

0 comments on commit eb4cac1

Please sign in to comment.