staging/lustre: annotate lock/unlock in lov_stripe_lock / lov_stripe_unlock
authorMostyn Bramley-Moore <mbmcode@gmail.com>
Sun, 7 Sep 2014 09:46:40 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 19:40:40 +0000 (12:40 -0700)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lov/lov_obd.c

index d1eb6dfa4fbcb7cee79d88f44030177380bda4f7..f0beb4c1e2816effaa8cc7c45b9c58f07ba5f861 100644 (file)
@@ -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;
This page took 0.026246 seconds and 5 git commands to generate.