Commit eb4cac10d9f7b006da842e2d37414d13e1333781

Authored by Trond Myklebust
Committed by Linus Torvalds
1 parent 0492c37137

NFS: Fix a list corruption problem

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 <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -280,8 +280,10 @@
280 280 spin_lock(req_lock);
281 281 }
282 282 spin_unlock(req_lock);
283   - if (nfs_set_page_writeback(page) == 0)
  283 + if (nfs_set_page_writeback(page) == 0) {
  284 + nfs_list_remove_request(req);
284 285 nfs_mark_request_dirty(req);
  286 + }
285 287 ret = test_bit(PG_NEED_FLUSH, &req->wb_flags);
286 288 nfs_unlock_request(req);
287 289 return ret;