Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb4cac10 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds
Browse files

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0492c371
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;