[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181120143425.43637-6-gaoxiang25@huawei.com>
Date: Tue, 20 Nov 2018 22:34:20 +0800
From: Gao Xiang <gaoxiang25@...wei.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<devel@...verdev.osuosl.org>
CC: LKML <linux-kernel@...r.kernel.org>,
<linux-erofs@...ts.ozlabs.org>, "Chao Yu" <yuchao0@...wei.com>,
Miao Xie <miaoxie@...wei.com>, <weidu.du@...wei.com>,
Gao Xiang <gaoxiang25@...wei.com>
Subject: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze
Just like other generic locks, insert a full barrier
in case of memory reorder.
Reviewed-by: Chao Yu <yuchao0@...wei.com>
Signed-off-by: Gao Xiang <gaoxiang25@...wei.com>
---
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
Powered by blists - more mailing lists