]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Fix another nfs_wb_page() deadlock
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 26 May 2010 12:42:24 +0000 (08:42 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:56 +0000 (11:22 -0700)
commit135b48da0c911dbd8aa4c52742b9022643bc02a3
treecf499293211f91c98327685f99fc2c56d195c4fd
parent53dc58fdce4053334b2f47e692d4769f92f41255
NFS: Fix another nfs_wb_page() deadlock

commit 0522f6adedd2736cbca3c0e16ca51df668993eee upstream.

J.R. Okajima reports that the call to sync_inode() in nfs_wb_page() can
deadlock with other writeback flush calls. It boils down to the fact
that we cannot ever call writeback_single_inode() while holding a page
lock (even if we do set nr_to_write to zero) since another process may
already be waiting in the call to do_writepages(), and so will deny us
the I_SYNC lock.

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