All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH 3/6] consolidate spin_lock/unlock waiting with spin_unlock_wait
Date: Mon, 16 Dec 2013 17:22:07 +0000	[thread overview]
Message-ID: <20131216172207.GD15665@opentech.at> (raw)


fs/fscache/object.c
consolidate spin_lock/unlock waiting with spin_unlock_wait()

config: x86_64_defconfig
toolchain: debian wheezy default x86_64-linux-gnu 4.4.5

Builds object.o without warnings.
runs on x86_64 but no specific test case for this change

CC: David Howells <dhowells@redhat.com>
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
 fs/fscache/object.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/fscache/object.c b/fs/fscache/object.c
index 53d35c5..43e1331 100644
--- a/fs/fscache/object.c
+++ b/fs/fscache/object.c
@@ -692,8 +692,7 @@ static const struct fscache_state *fscache_drop_object(struct fscache_object *ob
 	/* Prevent a race with our last child, which has to signal EV_CLEARED
 	 * before dropping our spinlock.
 	 */
-	spin_lock(&object->lock);
-	spin_unlock(&object->lock);
+	spin_unlock_wait(&object->lock);
 
 	/* Discard from the cache's collection of objects */
 	spin_lock(&cache->object_list_lock);
-- 
1.7.2.5


                 reply	other threads:[~2013-12-16 17:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131216172207.GD15665@opentech.at \
    --to=der.herr@hofr.at \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.