From: Bart Van Assche <Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org>
To: "jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH rdma-core] srp_daemon: Remove duplicate sync_res shutdown
Date: Tue, 19 Dec 2017 21:21:05 +0000 [thread overview]
Message-ID: <1513718464.2535.16.camel@wdc.com> (raw)
In-Reply-To: <20171219211601.GA27412-uk2M96/98Pc@public.gmane.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1267 bytes --]
On Tue, 2017-12-19 at 14:16 -0700, Jason Gunthorpe wrote:
> The very first thing free_res does is the same lock/signal/unlock
> sequence, so there is no reason to open code it before calling
> free_res.
>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
> srp_daemon/srp_daemon.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> Noticed while looking at honli's patch.. Didn't make a PR.
>
> diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
> index cec36db2e0f12e..a1798558373490 100644
> --- a/srp_daemon/srp_daemon.c
> +++ b/srp_daemon/srp_daemon.c
> @@ -2074,10 +2074,6 @@ static int ibsrpdm(int argc, char *argv[])
> pr_err("Querying SRP targets failed\n");
>
> assert(res->sync_res);
> - pthread_mutex_lock(&res->sync_res->retry_mutex);
> - res->sync_res->stop_threads = 1;
> - pthread_cond_signal(&res->sync_res->retry_cond);
> - pthread_mutex_unlock(&res->sync_res->retry_mutex);
Hello Jason,
Since this patch removes all code that dereferences res->sync_res from
the ibsrpdm() function, have you considered to remove assert(res->sync_res)
too?
Thanks,
Bart.N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±Ù{ayº\x1dÊÚë,j\a¢f£¢·h»öì\x17/oSc¾Ú³9uÀ¦æåÈ&jw¨®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~m
next prev parent reply other threads:[~2017-12-19 21:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 21:16 [PATCH rdma-core] srp_daemon: Remove duplicate sync_res shutdown Jason Gunthorpe
[not found] ` <20171219211601.GA27412-uk2M96/98Pc@public.gmane.org>
2017-12-19 21:21 ` Bart Van Assche [this message]
[not found] ` <1513718464.2535.16.camel-Sjgp3cTcYWE@public.gmane.org>
2017-12-19 21:28 ` Jason Gunthorpe
[not found] ` <20171219212818.GG14800-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-12-19 21:33 ` Bart Van Assche
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=1513718464.2535.16.camel@wdc.com \
--to=bart.vanassche-sjgp3ctcywe@public.gmane.org \
--cc=jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox