Skip to contentSkip to conversation

staging/lustre: annotate lock/unlock in lov_stripe_lock / lov_stripe_unlock

PATCH Superseded Mostyn Bramley-Moore 1 participant 1 message Sep 6, 2014 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/lustre: annotate lock/unlock in lov_stripe_lock / lov_stripe_unlock

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/

---
 drivers/staging/lustre/lustre/lov/lov_obd.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -0
index cb778df..0baef6a 100644
@@ -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;
Signature · 1 line
1.9.1