Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1957812imu; Fri, 23 Nov 2018 02:42:15 -0800 (PST) X-Google-Smtp-Source: AJdET5clPsTQvb4OfOcXlSroyTB0SFzhMntTG3IJu8nbF9MkoKRhnD8xDsZRhzVZhU3txZYmYWhh X-Received: by 2002:a62:5bc7:: with SMTP id p190-v6mr15371935pfb.175.1542969735027; Fri, 23 Nov 2018 02:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542969735; cv=none; d=google.com; s=arc-20160816; b=QqhAFEB+roy90yPftt1fPhDNcTBZdCDxxb2vyhgJsPzBreoWc/WqNSBwU73ddyrPx6 X+GpmXRCculGfGLqdILwbZFdhHYTVjushjnb2aRyMlZPsonf7i1LWA3kpTeeqjFz1rou XR/N/FkU427QxC2fjslYvoPc19+bGn8ILEet3VQEJpMNn8/s2cN5/TZ+PTJUk9ag2IBl VjXc8tJWj+UaIk0uzuYIPgZ0i9MQQlHE93Pxji+7c7iI3Bq78SAw+af2LvTwO7cuFzcX Vzp+Hu2ma3JubGs/UNPeuEnsVhSe5PX2dP65zirKyXSOPfLIZyguQha95m4ClrJGztdd Neig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/kFJZJ06PXXpfQDHnAALGVoWcosHvlIs4IyfDPX7AsY=; b=lnp7KvOO4q+FIMvWhrOgI1KFaWaRCE/ZqFOvUtGFoKx7yOfdjxlTx1simDKMcFTE59 XgnsokBMCL8A0IXpMFVLNhln7MsbYd1FN9UOXa4pqWuWAOgMi8SoWj9iwklf/akbgzTn gnXwVxRxwjWMdGMJ0K9U95vMdn371jMRdFePiSfCLndbp7gX3td8mhVGJ3JZtTU/K9OJ LNmWII/9gqKLIhjHLYeeiXQd3PNkqDssKAYNEH6ZuYPzxoYnrVZsL4Xw0ZdnZ9+MrfW4 s4hy0Bs8ZEv1ZmeRlj+XouCfLj6xeORBDf4aMJoQ7AKUuCBmtQqnqmB2HWOcYl8Hgatd PY1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E8N1I8nA; 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 b124si33947783pfg.47.2018.11.23.02.41.58; Fri, 23 Nov 2018 02:42:14 -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; dkim=pass header.i=@kernel.org header.s=default header.b=E8N1I8nA; 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 S2405294AbeKVVBX (ORCPT + 99 others); Thu, 22 Nov 2018 16:01:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:55252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405283AbeKVVBX (ORCPT ); Thu, 22 Nov 2018 16:01:23 -0500 Received: from localhost (unknown [95.99.132.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E237320684; Thu, 22 Nov 2018 10:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542882155; bh=z7AGX3R207QN9rszFYIZXQje4VZbYRok3hW/+QUAMa8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E8N1I8nArpzm387Zw3RDqQBYUa8+a2dREw41WjQ+gEPUdsJ3mYTz6mHxoapoPvHbq t1kpRWql1S+QaoDVNNDRoF2Odmq5f2KpEfayuelGa7ZRzd+jHuY+a+H8bLCoxMfLAw ox5oJ0pV7X5hJt26/T0oTzTkxD7GvtC0G25e0hUQ= Date: Thu, 22 Nov 2018 11:22:31 +0100 From: Greg Kroah-Hartman To: Gao Xiang Cc: devel@driverdev.osuosl.org, linux-erofs@lists.ozlabs.org, Chao Yu , LKML , weidu.du@huawei.com, Miao Xie Subject: Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze Message-ID: <20181122102230.GF3189@kroah.com> References: <20181120143425.43637-1-gaoxiang25@huawei.com> <20181120143425.43637-6-gaoxiang25@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120143425.43637-6-gaoxiang25@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 10:34:20PM +0800, Gao Xiang wrote: > 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(); Please document this memory barrier. It does not make much sense to me... thanks, greg k-h