From: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>,
Leon Romanovsky <leon@kernel.org>,
Dominique Martinet <asmadeus@codewreck.org>
Subject: [PATCH 2/2] 9p: avoid double put_trans on parse_opt failure
Date: Wed, 5 Oct 2022 06:51:14 +0900 [thread overview]
Message-ID: <20221004215114.1850991-2-asmadeus@codewreck.org> (raw)
In-Reply-To: <20221004215114.1850991-1-asmadeus@codewreck.org>
p9_client_destroy will catch that trans and put it when p9_client_create fails
This was brought up when reviewing an alternative implementation of the
previous patch [1]
Link: https://lkml.kernel.org/r/YzVzjR4Yz3Oo3JS+@codewreck.org [1]
Fixes: 3ff51294a055 ("9p: p9_client_create: use p9_client_destroy on failure")
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
---
net/9p/client.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index cf2d5b60b61b..693e06213a04 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -212,8 +212,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
}
free_and_return:
- if (ret)
- v9fs_put_trans(clnt->trans_mod);
kfree(tmp_options);
return ret;
}
--
2.35.1
next prev parent reply other threads:[~2022-10-04 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 21:51 [PATCH 1/2] 9p: client_create/destroy: only call trans_mod->close after create Dominique Martinet
2022-10-04 21:51 ` Dominique Martinet [this message]
2022-10-04 22:05 ` Dominique Martinet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221004215114.1850991-2-asmadeus@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=dan.carpenter@oracle.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.