public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"songliubraving@fb.com" <songliubraving@fb.com>
Subject: Re: [PATCH v3] scsi/sd: release scan_mutex during sync_cache and start_stop
Date: Wed, 8 Feb 2017 22:58:11 +0000	[thread overview]
Message-ID: <1486594677.16026.25.camel@sandisk.com> (raw)
In-Reply-To: <20170208225353.82334-1-songliubraving@fb.com>

On Wed, 2017-02-08 at 14:53 -0800, Song Liu wrote:
> +	try_lock_scan_mutex = mutex_trylock(&shost->scan_mutex);

This is at least as bad as the approach of your previous patch because
whether or not this mutex_trylock() call succeeds not only depends on
whether or not the caller holds the scan_mutex but also on whether any
other thread accidentally holds that mutex. Please stop hacking and do
what Christoph proposed, namely address the caller of this method.

Bart.

  parent reply	other threads:[~2017-02-08 22:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 22:53 [PATCH v3] scsi/sd: release scan_mutex during sync_cache and start_stop Song Liu
2017-02-08 22:56 ` Song Liu
2017-02-08 22:58 ` Bart Van Assche [this message]
2017-02-08 23:03   ` Song Liu

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=1486594677.16026.25.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /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