mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: peterz@infradead.org, mingo@kernel.org
Cc: linux-kernel@vger.kernel.org, dave@stgolabs.net, dbueso@suse.de
Subject: [PATCH 2/2] locking/rwsem-spinlock: Cleanup down_read()
Date: Thu, 11 Sep 2014 22:34:26 -0700	[thread overview]
Message-ID: <1410500066-5909-2-git-send-email-dave@stgolabs.net> (raw)
In-Reply-To: <1410500066-5909-1-git-send-email-dave@stgolabs.net>

... when returning from a successful lock acquisition. The horror!

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
 kernel/locking/rwsem-spinlock.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/locking/rwsem-spinlock.c b/kernel/locking/rwsem-spinlock.c
index 2c93571..07e456c 100644
--- a/kernel/locking/rwsem-spinlock.c
+++ b/kernel/locking/rwsem-spinlock.c
@@ -130,7 +130,7 @@ void __sched __down_read(struct rw_semaphore *sem)
 		/* granted */
 		sem->count++;
 		raw_spin_unlock_irqrestore(&sem->wait_lock, flags);
-		goto out;
+		return;
 	}
 
 	tsk = current;
@@ -155,8 +155,6 @@ void __sched __down_read(struct rw_semaphore *sem)
 	}
 
 	tsk->state = TASK_RUNNING;
- out:
-	;
 }
 
 /*
-- 
1.8.4.5


  reply	other threads:[~2014-09-12  5:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  5:34 [PATCH 1/2] locking/rwsem: EXPORT_SYMBOL follows function definition Davidlohr Bueso
2014-09-12  5:34 ` Davidlohr Bueso [this message]
2014-09-16  7:48   ` [PATCH 2/2] locking/rwsem-spinlock: Cleanup down_read() Ingo Molnar
2014-09-16 10:56 ` [tip:locking/core] locking/rwsem: Move EXPORT_SYMBOL() lines to follow function definition tip-bot for Davidlohr Bueso

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=1410500066-5909-2-git-send-email-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®