From 08f2570761e14927d549928adda34e83009c3862 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 27 Feb 2017 22:36:33 +0000 Subject: [PATCH] scst_copy_mgr: Warn if LUN lookup fails It really is a bug if LUN lookup fails. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7100 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_copy_mgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 9dfb3d95c..66a38eea4 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2544,6 +2544,8 @@ static unsigned int scst_cm_get_lun(const struct scst_device *dev) } } + WARN_ON_ONCE(res == SCST_MAX_LUN); + out: TRACE_EXIT_RES(res); return res;