Re: [PATCH v2 4/7] mm/hwpoison: replacing atomic_long_sub() with atomic_long_dec()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 23, 2013 at 06:30:38PM +0800, Wanpeng Li wrote:
> Repalce atomic_long_sub() with atomic_long_dec() since the page is 
> normal page instead of hugetlbfs page or thp.
> 
> Signed-off-by: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>

> ---
>  mm/memory-failure.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index a6c4752..297965e 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1363,7 +1363,7 @@ int unpoison_memory(unsigned long pfn)
>  			return 0;
>  		}
>  		if (TestClearPageHWPoison(p))
> -			atomic_long_sub(nr_pages, &num_poisoned_pages);
> +			atomic_long_dec(&num_poisoned_pages);
>  		pr_info("MCE: Software-unpoisoned free page %#lx\n", pfn);
>  		return 0;
>  	}
> -- 
> 1.8.1.2
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]