From: Pasha Tatashin Date: Wed, 3 Jun 2026 15:43:51 +0000 (+0000) Subject: liveupdate: avoid mixing cleanup guards with goto in luo_session_retrieve_fd X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6af06e11bd48bdefaf9381f6ff0bd65b1e5d98ab;p=thirdparty%2Fkernel%2Flinux.git liveupdate: avoid mixing cleanup guards with goto in luo_session_retrieve_fd Refactoring luo_session_retrieve_fd() to avoid mixing automated cleanup-style guards with goto-based resource release, which is not recommended under the Linux kernel coding style. Reviewed-by: Pratyush Yadav (Google) Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin Link: https://patch.msgid.link/20260603154402.468928-3-pasha.tatashin@soleen.com Signed-off-by: Mike Rapoport (Microsoft) --- diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c index 5c6cebc6e326..47566db64598 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -291,10 +291,11 @@ static int luo_session_retrieve_fd(struct luo_session *session, if (argp->fd < 0) return argp->fd; - guard(mutex)(&session->mutex); + mutex_lock(&session->mutex); err = luo_retrieve_file(&session->file_set, argp->token, &file); + mutex_unlock(&session->mutex); if (err < 0) - goto err_put_fd; + goto err_put_fd; err = luo_ucmd_respond(ucmd, sizeof(*argp)); if (err)