From: gaoxiang25@huawei.com (Gao Xiang)
Subject: [PATCH chao/erofs-dev] staging: erofs: add a full barrier in erofs_workgroup_unfreeze
Date: Mon, 22 Oct 2018 17:51:22 +0800 [thread overview]
Message-ID: <20181022095122.2129-1-gaoxiang25@huawei.com> (raw)
In-Reply-To: <b4ec415e-2d3e-a9bc-bfa4-6b38cc5228b5@kernel.org>
Just like other generic locks, insert a full barrier
in case of memory reorder.
Signed-off-by: Gao Xiang <gaoxiang25 at huawei.com>
---
drivers/staging/erofs/internal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 9d7ed3d130e3..bec439e2b428 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -218,6 +218,8 @@ erofs_workgroup_unfreeze(struct erofs_workgroup *grp,
int orig_val)
{
#if defined(CONFIG_SMP)
+ smp_mb();
+
atomic_set(&grp->refcount, orig_val);
#endif
preempt_enable();
--
2.14.4
next prev parent reply other threads:[~2018-10-22 9:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 3:43 [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms Gao Xiang
2018-09-21 3:43 ` [PREVIEW] [PATCH chao/erofs-dev 2/3] staging: erofs: fix race when the managed cache is enabled Gao Xiang
2018-10-01 9:49 ` Chao Yu
2018-10-01 11:37 ` Gao Xiang
2018-10-22 9:36 ` [PATCH v2 " Gao Xiang
2018-10-22 9:51 ` Gao Xiang [this message]
2018-09-21 3:43 ` [PREVIEW] [PATCH chao/erofs-dev 3/3] staging: erofs: managed pages could be locked at the time of decompression Gao Xiang
2018-10-01 10:03 ` Chao Yu
2018-09-30 16:22 ` [PREVIEW] [PATCH chao/erofs-dev 1/3] staging: erofs: harden inode lookup for 32-bit platforms Gao Xiang
2018-10-01 0:37 ` Chao Yu
2018-10-01 2:08 ` Gao Xiang
2018-10-01 10:25 ` Chao Yu
2018-10-01 11:25 ` Gao Xiang
2018-10-01 1:57 ` Chao Yu
2018-10-01 2:40 ` Gao Xiang
2018-10-01 3:04 ` Chao Yu
2018-10-01 4:26 ` Gao Xiang
2018-10-01 4:32 ` [PREVIEW][PATCH v2 chao/erofs-dev] " Gao Xiang
2018-10-01 5:24 ` Chao Yu
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=20181022095122.2129-1-gaoxiang25@huawei.com \
--to=gaoxiang25@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.