Skip to contentSkip to conversation

consolidate spin_lock/unlock waiting with spin_unlock_wait

PATCH New Nicholas Mc Guire 1 participant 1 message Dec 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/6 consolidate spin_lock/unlock waiting with spin_unlock_wait

llog_obd.c:
consolidate spin_lock/unlock waiting with spin_unlock_wait()

config: x86_64_defconfig with the following addition

        Device Drivers  --->
          [*] Staging drivers  --->
            <M>   Lustre file system client support

toolchain: debian wheezy default x86_64-linux-gnu 4.4.5

Builds llog_obd.o without warnings.
no runtime tests done

---
 drivers/staging/lustre/lustre/obdclass/llog_obd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/obdclass/llog_obd.c +1 -2
index 71817af..e6c0b90 100644
@@ -84,9 +84,8 @@ int __llog_ctxt_put(const struct lu_env *env, struct llog_ctxt *ctxt)
 	spin_unlock(&olg->olg_lock);
 
 	obd = ctxt->loc_obd;
-	spin_lock(&obd->obd_dev_lock);
 	/* sync with llog ctxt user thread */
-	spin_unlock(&obd->obd_dev_lock);
+	spin_unlock_wait(&obd->obd_dev_lock);
 
 	/* obd->obd_starting is needed for the case of cleanup
 	 * in error case while obd is starting up. */
Signature · 1 line
1.7.2.5