From 3dbdd38a6adcee63b6d89d4656e0099a0006f26c Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Wed, 11 Sep 2019 14:26:47 -0400 Subject: [PATCH] LU-11542 import: Fix missing spin_unlock() A recent patch moved the spin_unlock() down into each branch of an 'if', but missed the final 'else'. Add the spin_unlock in the else. Fixes: 29904135df67 ("LU-11542 import: fix race between imp_state & imp_invalid") Signed-off-by: Mr NeilBrown Change-Id: I6ee399050aad0fe9df9c0e3ddf8ec0be8eae1641 Reviewed-on: https://review.whamcloud.com/35999 Reviewed-by: Yang Sheng Reviewed-by: James Simmons Reviewed-by: Wang Shilong Tested-by: jenkins Tested-by: Maloo Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin --- lustre/ptlrpc/pinger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index f24e792..ae402dd 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -267,6 +267,8 @@ static void ptlrpc_pinger_process_import(struct obd_import *imp, } else if ((imp->imp_pingable && !suppress) || force_next || force) { spin_unlock(&imp->imp_lock); ptlrpc_ping(imp); + } else { + spin_unlock(&imp->imp_lock); } } -- 1.8.3.1