Re: + mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages.patch added to mm-unstable branch

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

 



Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> +		/*
> +		 * Fallback to PAGE_SIZE splice if the large folio has hwpoisoned
> +		 * pages.
> +		 */
> +		if (likely(!fallback_page_splice)) {
> +			size = len;
> +		} else {
> +			size_t offset = *ppos & ~PAGE_MASK;
> +
> +			size = min_t(loff_t, PAGE_SIZE - offset, len);
> +		}

It might look better to write this as:

		size = len;
		if (unlikely(fallback_page_splice)) {
			size_t offset = *ppos & ~PAGE_MASK;

			size = umin(size, PAGE_SIZE - offset);
		}

David





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux