[PATCH 4/6] consolidate spin_lock/unlock waiting with spin_unlock_wait

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

CC: Peng Tao <bergwolf@xxxxxxxxx>
CC: Alex Zhuravlev <alexey.zhuravlev@xxxxxxxxx>
Signed-off-by: Nicholas Mc Guire <der.herr@xxxxxxx>
---
 drivers/staging/lustre/lustre/obdclass/llog_obd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/llog_obd.c b/drivers/staging/lustre/lustre/obdclass/llog_obd.c
index 71817af..e6c0b90 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_obd.c
@@ -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. */
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux