Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4075193yba; Mon, 29 Apr 2019 13:18:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUH44fJM3m5pijlnbwqxHyfa4sDUBeM18onWECA9xQnQfNRkRoqPXGklV/k1s0eeZy/R1D X-Received: by 2002:a62:164f:: with SMTP id 76mr1673990pfw.172.1556569118503; Mon, 29 Apr 2019 13:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556569118; cv=none; d=google.com; s=arc-20160816; b=cyu5Mb/CY/hX5AptptADewCmFiQVYnNoSsQMn1A3MO53sK6qnO95cTJH8Fk8e4h3hC hpzToKwGDnxUjZ5R9+XCtjt63YwFsQx+E2YkCYrtJ5at9Mist/sv/IVO9QqBYQBJm5qX tuXpR0p/Xuvc6ZQubBkM0aL/ZfN8Tn3RSuwTPNA6k2DCO5QQoYUXmc8Fv8MUkgrPFqq+ OGCfSpGqIxuvd0nkrtBuSXnMYrWHfMbknGOsuhXurJ00Sy2IwmsPM82W+W1ajzz+7WLX UbVotMPGyPMlWCemqyfnYx5AqocTVQrzNVJu3gzMuhnMxS1ZVnSGs51qBS9Kb3GItuJ8 8ZFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=L14+mVgpFPqR6PXB76MX2XZrP0FVM4lLU8EXKkexDzc=; b=vAhjN4NDgY0F0po/pSg2deEiJOYcYIGcQPLFEBTW+yPQC40EA/q6iDgaAZFHgEPhad UyKxvRBU4GlfBer/ivnzWsI4Tnk53c6UdO+/7l82WZ/rUXRx0z3jerbsACeGBuD7F0wS hsr7OvjtHT8xsNzdYbzp3CxC2yyl81lvuQg3WTUQ/uYq0AfvpStY7+sfnSHvqoA6dcb5 N9/pvWw6ufIqe+jQOhgPMThiBIdCLIfm4MDLVp6LA7CtYMuqDd7CnkhZUH+4R+Y4R7Gb f6YcX9Ib2vwcQ8zfgL/R/Jj2sChuChHkEKz+sb8h3V3MpXpdwylYQ09R9AMiz7iiK+q0 ZS0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p1MVMVkZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si35450880pfi.117.2019.04.29.13.18.22; Mon, 29 Apr 2019 13:18:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p1MVMVkZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbfD2UQH (ORCPT + 99 others); Mon, 29 Apr 2019 16:16:07 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40592 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729436AbfD2UQF (ORCPT ); Mon, 29 Apr 2019 16:16:05 -0400 Received: by mail-wr1-f68.google.com with SMTP id h4so17875956wre.7 for ; Mon, 29 Apr 2019 13:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=L14+mVgpFPqR6PXB76MX2XZrP0FVM4lLU8EXKkexDzc=; b=p1MVMVkZfXD7VH7VAdpMlfn+K25MvJCB8GjUIb8s4KL5vdJXzEIjKrNVO0tWrsp4EY rZuXgmobi2BwqIh/efoKP08s8Fj8rjY+cmDs5U30A5ldRLuBCEpDKBlcyLDYNDvdbidK kGku/H1isgEG9s7kUlB0YeG0/RT3cCVNqKnS4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=L14+mVgpFPqR6PXB76MX2XZrP0FVM4lLU8EXKkexDzc=; b=BuUDME7HC58tqRqTwnP6wxICa0t6Qkldg9iRi48HJKSglopnygdh3rtB97a+7/JdrO 2FLMWKuMeaB14aB2UTBIFEkmW7fjGvzsbyCb8w24Nz5zsRJLqaFK+sSatyHdNeOiST13 j2owb1Viy/FO6DSHkrtkxecg2kKpmwbvyuybQg0oL4nlGhqwH3ypiTyhbYr3AO7kjQ+0 vqfNTGJ5PrKuQZjL7Ga2vahw0puldK6aZllkYNm3kMB4pzaCz7TUUV0f/k0RqD0OsWgD Ci1vnPavMsQe1uCUgsu8PefYQtA1PVwMQkTTgLu9ucA3FRGbT4Sj8pC4Yu+RIcUChuul YhIA== X-Gm-Message-State: APjAAAV9PJ/2iVb1D+WfNIEUmZj2QmwmgxCGffeYdLa+cLicSRWcIPLr wSEyCQUqNxSY3QIe50vZWzDvymPZOHM= X-Received: by 2002:adf:f84e:: with SMTP id d14mr3684795wrq.21.1556568963757; Mon, 29 Apr 2019 13:16:03 -0700 (PDT) Received: from localhost.localdomain (ip-93-97.sn2.clouditalia.com. [83.211.93.97]) by smtp.gmail.com with ESMTPSA id k6sm22864019wrd.20.2019.04.29.13.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Apr 2019 13:16:03 -0700 (PDT) From: Andrea Parri To: linux-kernel@vger.kernel.org Cc: Andrea Parri , stable@vger.kernel.org, "Yan, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel@vger.kernel.org Subject: [PATCH 4/5] ceph: fix improper use of smp_mb__before_atomic() Date: Mon, 29 Apr 2019 22:15:00 +0200 Message-Id: <1556568902-12464-5-git-send-email-andrea.parri@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556568902-12464-1-git-send-email-andrea.parri@amarulasolutions.com> References: <1556568902-12464-1-git-send-email-andrea.parri@amarulasolutions.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" Reported-by: Peter Zijlstra Signed-off-by: Andrea Parri Cc: "Yan, Zheng" Cc: Sage Weil Cc: Ilya Dryomov Cc: ceph-devel@vger.kernel.org --- fs/ceph/super.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 16c03188578ea..b5c782e6d62f1 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -541,7 +541,7 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci, long long release_count, long long ordered_count) { - smp_mb__before_atomic(); + smp_mb(); atomic64_set(&ci->i_complete_seq[0], release_count); atomic64_set(&ci->i_complete_seq[1], ordered_count); } -- 2.7.4