]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Wed, 27 Feb 2019 09:09:57 +0000 (10:09 +0100)
commit78c46113413bea1cc345757112aa2642e0f66de5
tree6dc095021f806049f44d13b362e443658e709d94
parentc6e083d1450c6e5434cd169ff78ce268909b6717
staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

commit 73f5c66df3e26ab750cefcb9a3e08c71c9f79cad upstream.

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