From 0bc376734441a6da0c4f1aced680703da7ff79a0 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Tue, 6 Aug 2019 01:48:44 +0530 Subject: [PATCH] LU-6142 ptlrpc: Fix style issues for llog_net.c This patch fixes issues reported by checkpatch for file lustre/ptlrpc/llog_net.c Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: Ieee60565e5332a1546999e6c8edaffc833074271 Reviewed-on: https://review.whamcloud.com/35823 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Petros Koutoupis Reviewed-by: Oleg Drokin --- lustre/ptlrpc/llog_net.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c index 9036491..2e9b6a8 100644 --- a/lustre/ptlrpc/llog_net.c +++ b/lustre/ptlrpc/llog_net.c @@ -48,20 +48,21 @@ int llog_initiator_connect(struct llog_ctxt *ctxt) { - struct obd_import *new_imp; - ENTRY; + struct obd_import *new_imp; - LASSERT(ctxt); - new_imp = ctxt->loc_obd->u.cli.cl_import; - LASSERTF(ctxt->loc_imp == NULL || ctxt->loc_imp == new_imp, - "%p - %p\n", ctxt->loc_imp, new_imp); + ENTRY; + + LASSERT(ctxt); + new_imp = ctxt->loc_obd->u.cli.cl_import; + LASSERTF(!ctxt->loc_imp || ctxt->loc_imp == new_imp, + "%p - %p\n", ctxt->loc_imp, new_imp); mutex_lock(&ctxt->loc_mutex); - if (ctxt->loc_imp != new_imp) { - if (ctxt->loc_imp) - class_import_put(ctxt->loc_imp); - ctxt->loc_imp = class_import_get(new_imp); - } + if (ctxt->loc_imp != new_imp) { + if (ctxt->loc_imp) + class_import_put(ctxt->loc_imp); + ctxt->loc_imp = class_import_get(new_imp); + } mutex_unlock(&ctxt->loc_mutex); - RETURN(0); + RETURN(0); } EXPORT_SYMBOL(llog_initiator_connect); -- 1.8.3.1