From: Greg Kroah-Hartman Date: Wed, 15 Nov 2017 17:27:37 +0000 (+0100) Subject: 3.18-stable patches X-Git-Tag: v3.18.82~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23477f60417048ef49b2f326baa7006343262f04;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch --- diff --git a/queue-3.18/revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch b/queue-3.18/revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch new file mode 100644 index 00000000000..6ee330521cd --- /dev/null +++ b/queue-3.18/revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch @@ -0,0 +1,41 @@ +From 0a138349efbc70593d3ca2de80a3f1db15f1ec1b Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Wed, 15 Nov 2017 18:26:01 +0100 +Subject: [PATCH] Revert "ceph: unlock dangling spinlock in try_flush_caps()" + +This reverts commit 55d4aa12af57ea7782f0c8bbc3b01e44673b05ba which is +commit 6c2838fbdedb9b72a81c931d49e56b229b6cdbca upstream. + +The locking issue was not a problem in 3.18, and now sparse rightly +complains about this being an issue, so go back to the "correct" code. + +Cc: Jeff Layton +Cc: "Yan, Zheng" +Cc: Ilya Dryomov +Signed-off-by: Greg Kroah-Hartman +--- + fs/ceph/caps.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/fs/ceph/caps.c ++++ b/fs/ceph/caps.c +@@ -1748,7 +1748,6 @@ static int try_flush_caps(struct inode * + retry: + spin_lock(&ci->i_ceph_lock); + if (ci->i_ceph_flags & CEPH_I_NOFLUSH) { +- spin_unlock(&ci->i_ceph_lock); + dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode); + goto out; + } +@@ -1766,10 +1765,8 @@ retry: + mutex_lock(&session->s_mutex); + goto retry; + } +- if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) { +- spin_unlock(&ci->i_ceph_lock); ++ if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) + goto out; +- } + + flushing = __mark_caps_flushing(inode, session); + diff --git a/queue-3.18/series b/queue-3.18/series new file mode 100644 index 00000000000..8cbcc87b448 --- /dev/null +++ b/queue-3.18/series @@ -0,0 +1 @@ +revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch