Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-06-29 10:39:08 +1000
committerNeilBrown <neilb@suse.de>2010-06-29 10:39:08 +1000
commit7a744773dd7c2539b7757435d0108cb701dd0165 (patch)
tree65b50c62a09c05bb92144a8004ff40ba56fc2e22
parent80bf02eb294bed187ab68e695e33fe0eb810481c (diff)
nfs_wb_page() deadlock (bnc#612794).
-rw-r--r--kernel-source.changes6
-rw-r--r--patches.fixes/nfs_wb_page_deadlock.fix43
-rw-r--r--series.conf1
3 files changed, 50 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 22fe5d10b5..0510f054c1 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Jun 29 02:38:57 CEST 2010 - nfbrown@suse.de
+
+- patches.fixes/nfs_wb_page_deadlock.fix: NFS: Fix another
+ nfs_wb_page() deadlock (bnc#612794).
+
+-------------------------------------------------------------------
Mon Jun 28 22:19:17 CEST 2010 - mmarek@suse.cz
- rpm/find-provides: Add base symsets to the main subpackage.
diff --git a/patches.fixes/nfs_wb_page_deadlock.fix b/patches.fixes/nfs_wb_page_deadlock.fix
new file mode 100644
index 0000000000..36bfe5d3cf
--- /dev/null
+++ b/patches.fixes/nfs_wb_page_deadlock.fix
@@ -0,0 +1,43 @@
+Git: 0522f6adedd2736cbca3c0e16ca51df668993eee Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Wed, 26 May 2010 08:42:24 -0400
+Subject: [PATCH] NFS: Fix another nfs_wb_page() deadlock
+Patch-mainline: 2.6.35
+References: bnc#612794
+
+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>
+Acked-by: NeilBrown <neilb@suse.de>
+
+---
+ fs/nfs/write.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- linux-2.6.34-openSUSE-11.3.orig/fs/nfs/write.c
++++ linux-2.6.34-openSUSE-11.3/fs/nfs/write.c
+@@ -1582,14 +1582,17 @@ int nfs_wb_page(struct inode *inode, str
+ };
+ int ret;
+
+- while(PagePrivate(page)) {
++ for (;;) {
+ wait_on_page_writeback(page);
+ if (clear_page_dirty_for_io(page)) {
+ ret = nfs_writepage_locked(page, &wbc);
+ if (ret < 0)
+ goto out_error;
++ continue;
+ }
+- ret = sync_inode(inode, &wbc);
++ if (!PagePrivate(page))
++ break;
++ ret = nfs_commit_inode(inode, FLUSH_SYNC);
+ if (ret < 0)
+ goto out_error;
+ }
diff --git a/series.conf b/series.conf
index 3dde13e017..134885d890 100644
--- a/series.conf
+++ b/series.conf
@@ -331,6 +331,7 @@
patches.fixes/nfsd-06-sunrpc-cache-retry-cache-lookups-that-return-ETIMEDO.patch
patches.fixes/nfsd-07-nfsd-idmap-drop-special-request-deferal-in-favour-of.patch
patches.fixes/sunrpc-monotonic-expiry
+ patches.fixes/nfs_wb_page_deadlock.fix
########################################################
# lockd + statd