All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "[PATCH] Revert "ceph: unlock dangling spinlock in try_flush_caps()"" has been added to the 3.18-stable tree
@ 2017-11-15 17:27 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-11-15 17:27 UTC (permalink / raw)
  To: gregkh, idryomov, jlayton, zyan; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    [PATCH] Revert "ceph: unlock dangling spinlock in try_flush_caps()"

to the 3.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 0a138349efbc70593d3ca2de80a3f1db15f1ec1b Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <jlayton@redhat.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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);
 


Patches currently in stable-queue which might be from gregkh@linuxfoundation.org are

queue-3.18/revert-ceph-unlock-dangling-spinlock-in-try_flush_caps.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-15 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 17:27 Patch "[PATCH] Revert "ceph: unlock dangling spinlock in try_flush_caps()"" has been added to the 3.18-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.