code layout cleaup, per dhowells
Link: https://lkml.kernel.org/r/32dd938c-3531-49f7-93e4-b7ff21fec569@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Suggested-by: David Howells <dhowells@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* Fallback to PAGE_SIZE splice if the large folio has hwpoisoned
* pages.
*/
- if (likely(!fallback_page_splice)) {
- size = len;
- } else {
+ size = len;
+ if (unlikely(fallback_page_splice)) {
size_t offset = *ppos & ~PAGE_MASK;
- size = min_t(loff_t, PAGE_SIZE - offset, len);
+ size = umin(size, PAGE_SIZE - offset);
}
part = min_t(loff_t, isize - *ppos, size);