If local_oid_storage_init() returns an error, the cl_mgc_mutex()
should be released.
Fixes:
3e38436dc09 ("LU-2059 llog: MGC to use OSD API for backup logs")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I921dde4e9202733874d8e7f980e95af23739a655
Reviewed-on: https://review.whamcloud.com/45063
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
rc = local_oid_storage_init(env, lsi->lsi_dt_dev, &fid,
&cli->cl_mgc_los);
if (rc)
- RETURN(rc);
+ GOTO(out_mutex, rc);
rc = dt_root_get(env, lsi->lsi_dt_dev, &rfid);
if (rc)
out_los:
if (rc < 0) {
local_oid_storage_fini(env, cli->cl_mgc_los);
+out_mutex:
cli->cl_mgc_los = NULL;
mutex_unlock(&cli->cl_mgc_mutex);
}