public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mostyn Bramley-Moore <mbmcode@gmail.com>
To: linux-kernel@vger.kernel.org, mbmcode@gmail.com
Subject: [PATCH] staging/lustre: annotate lock/unlock in lov_stripe_lock / lov_stripe_unlock
Date: Sat,  6 Sep 2014 12:20:06 +0200	[thread overview]
Message-ID: <1409998806-6413-1-git-send-email-mbmcode@gmail.com> (raw)

Annotate the lock/unlock pair in lov_stripe_lock/lov_stripe_unlock to
avoid sparse warning about a context imbalance.
Part of the eudyptula challenge: http://eudyptula-challenge.org/

Signed-off-by: Mostyn Bramley-Moore <mbmcode@gmail.com>
---
 drivers/staging/lustre/lustre/lov/lov_obd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index cb778df..0baef6a 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -2649,6 +2649,7 @@ static int lov_extent_calc(struct obd_export *exp, struct lov_stripe_md *lsm,
 }
 
 void lov_stripe_lock(struct lov_stripe_md *md)
+		__acquires(&md->lsm_lock)
 {
 	LASSERT(md->lsm_lock_owner != current_pid());
 	spin_lock(&md->lsm_lock);
@@ -2658,6 +2659,7 @@ void lov_stripe_lock(struct lov_stripe_md *md)
 EXPORT_SYMBOL(lov_stripe_lock);
 
 void lov_stripe_unlock(struct lov_stripe_md *md)
+		__releases(&md->lsm_lock)
 {
 	LASSERT(md->lsm_lock_owner == current_pid());
 	md->lsm_lock_owner = 0;
-- 
1.9.1


                 reply	other threads:[~2014-09-06 10:20 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=1409998806-6413-1-git-send-email-mbmcode@gmail.com \
    --to=mbmcode@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox