]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/erofs/internal.h
Merge branch 'for-6.0/dax' into libnvdimm-fixes
[people/ms/linux.git] / fs / erofs / internal.h
index cfee49d33b95a0b5ce4665af3320a90cc32df45f..a01cc82795a25398f79a5b99e3c2ef796c77c4df 100644 (file)
@@ -195,7 +195,6 @@ struct erofs_workgroup {
        atomic_t refcount;
 };
 
-#if defined(CONFIG_SMP)
 static inline bool erofs_workgroup_try_to_freeze(struct erofs_workgroup *grp,
                                                 int val)
 {
@@ -224,34 +223,6 @@ static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)
        return atomic_cond_read_relaxed(&grp->refcount,
                                        VAL != EROFS_LOCKED_MAGIC);
 }
-#else
-static inline bool erofs_workgroup_try_to_freeze(struct erofs_workgroup *grp,
-                                                int val)
-{
-       preempt_disable();
-       /* no need to spin on UP platforms, let's just disable preemption. */
-       if (val != atomic_read(&grp->refcount)) {
-               preempt_enable();
-               return false;
-       }
-       return true;
-}
-
-static inline void erofs_workgroup_unfreeze(struct erofs_workgroup *grp,
-                                           int orig_val)
-{
-       preempt_enable();
-}
-
-static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)
-{
-       int v = atomic_read(&grp->refcount);
-
-       /* workgroup is never freezed on uniprocessor systems */
-       DBG_BUGON(v == EROFS_LOCKED_MAGIC);
-       return v;
-}
-#endif /* !CONFIG_SMP */
 #endif /* !CONFIG_EROFS_FS_ZIP */
 
 /* we strictly follow PAGE_SIZE and no buffer head yet */