mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, kvm@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Andrea Parri <andrea.parri@amarulasolutions.com>
Subject: Re: [PATCH] vhost/scsi: drop unnecessary smp_mb__after_atomic()
Date: Wed, 17 Apr 2019 13:57:18 +0800	[thread overview]
Message-ID: <c18ed846-940b-0b10-3d40-639b1f8dc499@redhat.com> (raw)
In-Reply-To: <20190416104748.26942-1-stefanha@redhat.com>


On 2019/4/16 下午6:47, Stefan Hajnoczi wrote:
> The vhost_scsi.ko code used several atomic variables at one point.
> Later they were dropped or converted to regular ints protected by a
> mutex.
>
> The commit that made these changes left an unused smp_mb__after_atomic()
> in vhost_scsi_set_endpoint().  It was previously used after incrementing
> vhost_scsi->vhost_ref_cnt but this field has been dropped:
>
>    -     atomic_inc(&vs->vhost_ref_cnt);
>          smp_mb__after_atomic_inc();
>
> Reported-by: Andrea Parri <andrea.parri@amarulasolutions.com>
> Fixes: 101998f6fcd680 ("tcm_vhost: Post-merge review changes requested by MST")
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   drivers/vhost/scsi.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 618fb6461017..c090d177bd75 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1443,7 +1443,6 @@ vhost_scsi_set_endpoint(struct vhost_scsi *vs,
>   			tpg->tv_tpg_vhost_count++;
>   			tpg->vhost_scsi = vs;
>   			vs_tpg[tpg->tport_tpgt] = tpg;
> -			smp_mb__after_atomic();
>   			match = true;
>   		}
>   		mutex_unlock(&tpg->tv_tpg_mutex);


Looks like Paolo has sent an identical patch before this one.

Thanks


  reply	other threads:[~2019-04-17  5:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 10:47 Stefan Hajnoczi
2019-04-17  5:57 ` Jason Wang [this message]
2019-04-18  8:56   ` Stefan Hajnoczi

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=c18ed846-940b-0b10-3d40-639b1f8dc499@redhat.com \
    --to=jasowang@redhat.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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

all inboxes | Powered by JetHome®