mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
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@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
73f5c66df3
commit
948bbdb181
1 changed files with 5 additions and 0 deletions
|
|
@ -209,6 +209,11 @@ 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)
|
||||
{
|
||||
/*
|
||||
* other observers should notice all modifications
|
||||
* in the freezing period.
|
||||
*/
|
||||
smp_mb();
|
||||
atomic_set(&grp->refcount, orig_val);
|
||||
preempt_enable();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue