Re: [PATCH v3 07/11] mm/memory-failure: Convert memory_failure() to use a folio

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

 



On 2024/4/13 3:35, Matthew Wilcox (Oracle) wrote:
>  
>  	/*
>  	 * Now take care of user space mappings.
> @@ -2368,7 +2369,8 @@ int memory_failure(unsigned long pfn, int flags)
>  	/*
>  	 * Torn down by someone else?
>  	 */
> -	if (PageLRU(p) && !PageSwapCache(p) && p->mapping == NULL) {
> +	if (folio_test_lru(folio) && !folio_test_swapcache(folio) &&
> +	    folio->mapping == NULL) {
>  		res = action_result(pfn, MF_MSG_TRUNCATED_LRU, MF_IGNORED);
>  		goto unlock_page;
>  	}
> @@ -2378,7 +2380,7 @@ int memory_failure(unsigned long pfn, int flags)
>  	mutex_unlock(&mf_mutex);
>  	return res;
>  unlock_page:

This label might be replaced with unlock_folio: ? Anyway, this patch looks good to me.
Acked-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
Thanks.
.




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

  Powered by Linux