mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
mm, hwpoison: use num_poisoned_pages_sub() to decrease num_poisoned_pages
Use num_poisoned_pages_sub() to combine multiple atomic ops into one. Also num_poisoned_pages_dec() can be killed as there's no caller now. Link: https://lkml.kernel.org/r/20220830123604.25763-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
da29499124
commit
21c9e90ab9
@@ -485,11 +485,6 @@ static inline void num_poisoned_pages_inc(void)
|
||||
atomic_long_inc(&num_poisoned_pages);
|
||||
}
|
||||
|
||||
static inline void num_poisoned_pages_dec(void)
|
||||
{
|
||||
atomic_long_dec(&num_poisoned_pages);
|
||||
}
|
||||
|
||||
static inline void num_poisoned_pages_sub(long i)
|
||||
{
|
||||
atomic_long_sub(i, &num_poisoned_pages);
|
||||
|
||||
Reference in New Issue
Block a user