From: Timothy Day Date: Thu, 14 Dec 2023 16:27:40 +0000 (+0000) Subject: LU-8802 obd: str2dev is missing obd_device_unlock() X-Git-Tag: 2.15.60~4 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=c68fce096fc1eadfb6186f57e4c3b2b239392c6e;p=fs%2Flustre-release.git LU-8802 obd: str2dev is missing obd_device_unlock() class_str2dev() was missing an obd_device_unlock(). I haven't seen any bugs related to this missing unlock. I suspect the mount state machine avoids this. Add the unlock just to be safe. Fixes: c5e5060d950 ("LU-8802 obd: remove MAX_OBD_DEVICES") Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I7a813f9d4931a7a9979223bfde5efea07f1e5228 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53466 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index ff1d7b4..611a8ec 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -667,6 +667,7 @@ struct obd_device *class_str2obd(const char *str) class_incref(obd, "find", current); break; } + obd_device_unlock(); RETURN(NULL); } }