OSDN Git Service

staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'
authorGao Xiang <gaoxiang25@huawei.com>
Thu, 22 Nov 2018 17:16:02 +0000 (01:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Nov 2018 09:53:07 +0000 (10:53 +0100)
commit73f5c66df3e26ab750cefcb9a3e08c71c9f79cad
treeff1a903537a5b30759a8d918863ea72bc257614e
parentdf134b8d17b90c1e7720e318d36416b57424ff7a
staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

There are two minor issues in the current freeze interface:

   1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK,
      therefore fix the incorrect conditions;

   2) For SMP platforms, it should also disable preemption before
      doing atomic_cmpxchg in case that some high priority tasks
      preempt between atomic_cmpxchg and disable_preempt, then spin
      on the locked refcount later.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/internal.h