mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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) <pratyush@kernel.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Link: https://patch.msgid.link/20260603154402.468928-3-pasha.tatashin@soleen.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This commit is contained in:
parent
81fbb909ec
commit
6af06e11bd
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user