mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: Andrea Parri <andrea.parri@amarulasolutions.com>,
	linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, Sage Weil <sage@redhat.com>,
	Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@linux.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 4/4] ceph: fix improper use of smp_mb__before_atomic()
Date: Tue, 21 May 2019 10:18:07 +0800	[thread overview]
Message-ID: <a1dcab3f-6018-9d4d-ee6d-505b4086f097@redhat.com> (raw)
In-Reply-To: <1558373038-5611-5-git-send-email-andrea.parri@amarulasolutions.com>

On 5/21/19 1:23 AM, Andrea Parri wrote:
> This barrier only applies to the read-modify-write operations; in
> particular, it does not apply to the atomic64_set() primitive.
> 
> Replace the barrier with an smp_mb().
> 
> Fixes: fdd4e15838e59 ("ceph: rework dcache readdir")
> Cc: stable@vger.kernel.org
> Reported-by: "Paul E. McKenney" <paulmck@linux.ibm.com>
> Reported-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
> Cc: "Yan, Zheng" <zyan@redhat.com>
> Cc: Sage Weil <sage@redhat.com>
> Cc: Ilya Dryomov <idryomov@gmail.com>
> Cc: ceph-devel@vger.kernel.org
> Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> ---
>   fs/ceph/super.h | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/super.h b/fs/ceph/super.h
> index 6edab9a750f8a..e02f4ff0be3f1 100644
> --- a/fs/ceph/super.h
> +++ b/fs/ceph/super.h
> @@ -541,7 +541,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,
>   					   long long release_count,
>   					   long long ordered_count)
>   {
> -	smp_mb__before_atomic();
> +	/*
> +	 * Makes sure operations that setup readdir cache (update page
> +	 * cache and i_size) are strongly ordered w.r.t. the following
> +	 * atomic64_set() operations.
> +	 */
> +	smp_mb();
>   	atomic64_set(&ci->i_complete_seq[0], release_count);
>   	atomic64_set(&ci->i_complete_seq[1], ordered_count);
>   }
> 

Applied, thanks


  reply	other threads:[~2019-05-21  2:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 17:23 [PATCH 0/4] Fix improper uses of smp_mb__{before,after}_atomic() Andrea Parri
2019-05-20 17:23 ` [PATCH 1/4] drm/msm: " Andrea Parri
2019-05-20 21:07   ` Jordan Crouse
2019-05-20 17:23 ` [PATCH 2/4] bio: fix improper use of smp_mb__before_atomic() Andrea Parri
2019-05-20 17:23 ` [PATCH 3/4] sbitmap: " Andrea Parri
2019-05-20 17:23 ` [PATCH 4/4] ceph: " Andrea Parri
2019-05-21  2:18   ` Yan, Zheng [this message]
2019-05-20 19:35 ` [PATCH 0/4] Fix improper uses of smp_mb__{before,after}_atomic() Jens Axboe

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=a1dcab3f-6018-9d4d-ee6d-505b4086f097@redhat.com \
    --to=zyan@redhat.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=sage@redhat.com \
    --cc=stable@vger.kernel.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®