diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h index 771a84e3077da430907c9e1e578f3911419b5720..9f44ed8f00239992e1648a835afd77c297b54117 100644 --- a/drivers/staging/erofs/internal.h +++ b/drivers/staging/erofs/internal.h @@ -199,6 +199,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(); }