NFS: Fix an Oops when truncating a file
commit04673da74dbd331040fa439bd72963a35f1b67cf
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 3 Feb 2010 13:27:22 +0000 (3 08:27 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Feb 2010 15:37:51 +0000 (23 07:37 -0800)
tree9c04a2a2769d4f99dff83b9e1802bd54da147e69
parente7055c2366a5a5b507492905200d4327949b81ce
NFS: Fix an Oops when truncating a file

commit 9f557cd8073104b39528794d44e129331ded649f upstream.

The VM/VFS does not allow mapping->a_ops->invalidatepage() to fail.
Unfortunately, nfs_wb_page_cancel() may fail if a fatal signal occurs.
Since the NFS code assumes that the page stays mapped for as long as the
writeback is active, we can end up Oopsing (among other things).

The only safe fix here is to convert nfs_wait_on_request(), so as to make
it uninterruptible (as is already the case with wait_on_page_writeback()).

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/pagelist.c