Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp745807imu; Tue, 20 Nov 2018 06:22:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/UYMFeBRzbGEfeseor9Syz4+eSv7pXWcJnSoryz7ZLuZmqOYKv9xgJZsu60cH3aMa48I+xm X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr2453541plb.332.1542723770307; Tue, 20 Nov 2018 06:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542723770; cv=none; d=google.com; s=arc-20160816; b=Iyu0dp1sY8LLpKjf5xKHiBhJyfDYdX52pvF131CXeS0D7InSE3iz8L459IzvkodQVr 30oB89UjkVhYF4+TH6KovudqKOlUiugsIJ88RC2xVdImX1XD8+iCr+EVpxldRU5NhGbP MSYfEQ6RGXABJhqYddQqt181m5AOxYGA/mQ19y3019FsegqG3hBn4MgMx47Pem7pLx2o 0YH7/QTfDsJ81xuTT1069aRGdfmRx01MOr9GsurnMdVm2IE1Q1LWxdj6/Qzvq5LDN/5c LNUts/FloUKkXszYkCIgvw3YAsKDTyFWcN6XjhvQig4aAS0uoNXOrhLaFI9U/ECpgT58 tY/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=sOMiXD0iCh0yPmflOWj/J/5qMFQRSCaWjisTzgOBrvw=; b=mki0ncjE5SGoExzPqCRvjYGK4hd3JIO6v2FxrbZyUWtIT4/ZXQfU5uPTL85Md5ciOf He3iiBVFpKTXEYAEaJUeKP5Is0e4G6bzhsw5hBQr9Igj9f/xu/cH0m3wRuqSDM7dXbBr 7mmfz96eoUwBxrcxKZpnNm8ECFJgGvkeaz22mAQApQ5H+gi9gT3va9SuSku9NGPXoqPi jXKtwWg4PkSvqlZdjsL8fY1UMjtCqgHVK9gRaQcIL3WTDA7a429yV7fAQyCBuS8L6L8P 3dDXgyu7yt7SOJ1y4O1SuKtBpqgotNyO24Kfco5Xn2ukNqsMK06IAbhb4Qd53mJoAPFf 0nSg== ARC-Authentication-Results: i=1; mx.google.com; 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 37si41379832pgs.447.2018.11.20.06.22.35; Tue, 20 Nov 2018 06:22:50 -0800 (PST) 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; 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 S1729762AbeKUAul (ORCPT + 99 others); Tue, 20 Nov 2018 19:50:41 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15127 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725995AbeKUAul (ORCPT ); Tue, 20 Nov 2018 19:50:41 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A4F36BC48BAFA; Tue, 20 Nov 2018 22:21:14 +0800 (CST) Received: from localhost.localdomain (10.175.124.28) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 20 Nov 2018 22:21:05 +0800 From: Gao Xiang To: Greg Kroah-Hartman , CC: LKML , , "Chao Yu" , Miao Xie , , Gao Xiang Subject: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze Date: Tue, 20 Nov 2018 22:34:20 +0800 Message-ID: <20181120143425.43637-6-gaoxiang25@huawei.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20181120143425.43637-1-gaoxiang25@huawei.com> References: <20181120143425.43637-1-gaoxiang25@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just like other generic locks, insert a full barrier in case of memory reorder. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h index 2e0ef92c138b..f77653d33633 100644 --- a/drivers/staging/erofs/internal.h +++ b/drivers/staging/erofs/internal.h @@ -209,6 +209,7 @@ static inline bool erofs_workgroup_try_to_freeze(struct erofs_workgroup *grp, static inline void erofs_workgroup_unfreeze(struct erofs_workgroup *grp, int orig_val) { + smp_mb(); atomic_set(&grp->refcount, orig_val); preempt_enable(); } -- 2.14.4