From: Mr NeilBrown Date: Wed, 11 Sep 2019 18:26:47 +0000 (-0400) Subject: LU-11542 import: Fix missing spin_unlock() X-Git-Tag: 2.12.3-RC1~37 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b286293a86465b5404c17ac9e817440e8cad475c 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. Lustre-change: https://review.whamcloud.com/35999 Lustre-commit: 3dbdd38a6adcee63b6d89d4656e0099a0006f26c Fixes: 29904135df67 ("LU-11542 import: fix race between imp_state & imp_invalid") Signed-off-by: Mr NeilBrown Change-Id: I6ee399050aad0fe9df9c0e3ddf8ec0be8eae1641 Reviewed-by: Yang Sheng Reviewed-by: James Simmons Reviewed-by: Wang Shilong Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/36251 Tested-by: jenkins Reviewed-by: Neil Brown Tested-by: Maloo --- diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index fa5f1d3..37cbffc 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -263,6 +263,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); } }