]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix a writeback race...
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 18 Oct 2007 21:08:05 +0000 (17:08 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 19 Oct 2007 21:18:57 +0000 (17:18 -0400)
commit4dd8b4dcd435296449db4a908e9b9ee99d54d733
tree65553920bd6a471c2bae5a35ed3b4cee8bdf1258
parent5f46b63f7c23b76e028f114900d475eb082dd414
NFS: Fix a writeback race...

This patch fixes a regression that was introduced by commit
b045011d850d8df1c97230c83f4ef3e11d532bfe

We cannot zero the user page in nfs_mark_uptodate() any more, since

  a) We'd be modifying the page without holding the page lock
  b) We can race with other updates of the page, most notably
     because of the call to nfs_wb_page() in nfs_writepage_setup().

Instead, we do the zeroing in nfs_update_request() if we see that we're
creating a request that might potentially be marked as up to date.

Thanks to Olivier Paquet for reporting the bug and providing a test-case.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/write.c