提交 eb4cac10 编写于 作者: T Trond Myklebust 提交者: Linus Torvalds

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0492c371
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册