Home Home > GIT Browse
summaryrefslogtreecommitdiff
authorNeilBrown <neilb@suse.de>2010-06-29 00:39:08 (GMT)
committer NeilBrown <neilb@suse.de>2010-06-29 00:39:08 (GMT)
commit7a744773dd7c2539b7757435d0108cb701dd0165 (patch) (unidiff)
tree65b50c62a09c05bb92144a8004ff40ba56fc2e22
parent80bf02eb294bed187ab68e695e33fe0eb810481c (diff)
- patches.fixes/nfs_wb_page_deadlock.fix: NFS: Fix anotherrpm-2.6.34-12
nfs_wb_page() deadlock (bnc#612794).
Diffstat (more/less context) (ignore whitespace changes)
-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 22fe5d1..0510f05 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,10 @@
1------------------------------------------------------------------- 1-------------------------------------------------------------------
2Tue Jun 29 02:38:57 CEST 2010 - nfbrown@suse.de
3
4- patches.fixes/nfs_wb_page_deadlock.fix: NFS: Fix another
5 nfs_wb_page() deadlock (bnc#612794).
6
7-------------------------------------------------------------------
2Mon Jun 28 22:19:17 CEST 2010 - mmarek@suse.cz 8Mon Jun 28 22:19:17 CEST 2010 - mmarek@suse.cz
3 9
4- rpm/find-provides: Add base symsets to the main subpackage. 10- 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 0000000..36bfe5d
--- a/dev/null
+++ b/patches.fixes/nfs_wb_page_deadlock.fix
@@ -0,0 +1,43 @@
1Git: 0522f6adedd2736cbca3c0e16ca51df668993eee Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Wed, 26 May 2010 08:42:24 -0400
4Subject: [PATCH] NFS: Fix another nfs_wb_page() deadlock
5Patch-mainline: 2.6.35
6References: bnc#612794
7
8J.R. Okajima reports that the call to sync_inode() in nfs_wb_page() can
9deadlock with other writeback flush calls. It boils down to the fact
10that we cannot ever call writeback_single_inode() while holding a page
11lock (even if we do set nr_to_write to zero) since another process may
12already be waiting in the call to do_writepages(), and so will deny us
13the I_SYNC lock.
14
15Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16Acked-by: NeilBrown <neilb@suse.de>
17
18---
19 fs/nfs/write.c | 7 +++++--
20 1 file changed, 5 insertions(+), 2 deletions(-)
21
22--- linux-2.6.34-openSUSE-11.3.orig/fs/nfs/write.c
23+++ linux-2.6.34-openSUSE-11.3/fs/nfs/write.c
24@@ -1582,14 +1582,17 @@ int nfs_wb_page(struct inode *inode, str
25 };
26 int ret;
27
28 -while(PagePrivate(page)) {
29 +for (;;) {
30 wait_on_page_writeback(page);
31 if (clear_page_dirty_for_io(page)) {
32 ret = nfs_writepage_locked(page, &wbc);
33 if (ret < 0)
34 goto out_error;
35 + continue;
36 }
37 - ret = sync_inode(inode, &wbc);
38 + if (!PagePrivate(page))
39 + break;
40 + ret = nfs_commit_inode(inode, FLUSH_SYNC);
41 if (ret < 0)
42 goto out_error;
43 }
diff --git a/series.conf b/series.conf
index 3dde13e..134885d 100644
--- a/series.conf
+++ b/series.conf
@@ -331,6 +331,7 @@
331 patches.fixes/nfsd-06-sunrpc-cache-retry-cache-lookups-that-return-ETIMEDO.patch 331 patches.fixes/nfsd-06-sunrpc-cache-retry-cache-lookups-that-return-ETIMEDO.patch
332 patches.fixes/nfsd-07-nfsd-idmap-drop-special-request-deferal-in-favour-of.patch 332 patches.fixes/nfsd-07-nfsd-idmap-drop-special-request-deferal-in-favour-of.patch
333 patches.fixes/sunrpc-monotonic-expiry 333 patches.fixes/sunrpc-monotonic-expiry
334 patches.fixes/nfs_wb_page_deadlock.fix
334 335
335 ######################################################## 336 ########################################################
336 # lockd + statd 337 # lockd + statd