projects/linux·commit eb4cac10

NFS: Fix a list corruption problem

eb4cac10 · Trond Myklebust <[email protected]> · 2007-04-15 16:21:49 -04:00

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]>
Commit
eb4cac10d9f7b006da842e2d37414d13e1333781
Parents
0492c371

Changes

1 files changed · +3 −1

FileStatusAddDelContent
fs/nfs/write.cmodified+3−1View file

fs/nfs/write.c

View file
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index e5d7cac..ad2e91b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -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;