From: Mostyn Bramley-Moore Date: Sun, 7 Sep 2014 09:46:40 +0000 (+0200) Subject: staging/lustre: annotate lock/unlock in lov_stripe_lock / lov_stripe_unlock X-Git-Tag: v3.18-rc1~130^2~775 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=82604f8c97730e2962ab4cc4704fdbe105cfb6df;p=karo-tx-linux.git 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/ Signed-off-by: Mostyn Bramley-Moore Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index d1eb6dfa4fbc..f0beb4c1e281 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -2129,6 +2129,7 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, } 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); @@ -2138,6 +2139,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;