[lustre-devel] [PATCH 487/622] lustre: import: Fix missing spin_unlock()

James Simmons jsimmons at infradead.org
Thu Feb 27 13:15:55 PST 2020


From: Mr NeilBrown <neilb at suse.com>

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: 428ed8100580 ("lustre: import: fix race between imp_state & imp_invalid")
WC-bug-id: https://jira.whamcloud.com/browse/LU-11542
Lustre-commit: 3dbdd38a6adc ("LU-11542 import: Fix missing spin_unlock()")
Signed-off-by: Mr NeilBrown <neilb at suse.com>
Reviewed-on: https://review.whamcloud.com/35999
Reviewed-by: Yang Sheng <ys at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Wang Shilong <wshilong at ddn.com>
Reviewed-by: Patrick Farrell <pfarrell at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/ptlrpc/pinger.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/lustre/ptlrpc/pinger.c b/fs/lustre/ptlrpc/pinger.c
index a812942..f584fc6 100644
--- a/fs/lustre/ptlrpc/pinger.c
+++ b/fs/lustre/ptlrpc/pinger.c
@@ -242,6 +242,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



More information about the lustre-devel mailing list