Whamcloud - gitweb
LU-11542 import: Fix missing spin_unlock() 99/35999/4
authorMr NeilBrown <neilb@suse.com>
Wed, 11 Sep 2019 18:26:47 +0000 (14:26 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Sep 2019 07:53:57 +0000 (07:53 +0000)
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 <neilb@suse.com>
Change-Id: I6ee399050aad0fe9df9c0e3ddf8ec0be8eae1641
Reviewed-on: https://review.whamcloud.com/35999
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/pinger.c

index f24e792..ae402dd 100644 (file)
@@ -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);
        }
 }