Whamcloud - gitweb
LU-8802 obd: str2dev is missing obd_device_unlock() 66/53466/2
authorTimothy Day <timday@amazon.com>
Thu, 14 Dec 2023 16:27:40 +0000 (16:27 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jan 2024 03:03:53 +0000 (03:03 +0000)
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 <timday@amazon.com>
Change-Id: I7a813f9d4931a7a9979223bfde5efea07f1e5228
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53466
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/genops.c

index ff1d7b4..611a8ec 100644 (file)
@@ -667,6 +667,7 @@ struct obd_device *class_str2obd(const char *str)
                                class_incref(obd, "find", current);
                                break;
                        }
+                       obd_device_unlock();
                        RETURN(NULL);
                }
        }