Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
"9 patches.

Subsystems affected by this patch series: mm (thp, memcg, gup,
migration, memory-hotplug), lib, and x86"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: don't rely on system state to detect hot-plug operations
mm: replace memmap_context by meminit_context
arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback
lib/memregion.c: include memregion.h
lib/string.c: implement stpcpy
mm/migrate: correct thp migration stats
mm/gup: fix gup_fast with dynamic page table folding
mm: memcontrol: fix missing suffix of workingset_restore
mm, THP, swap: fix allocating cluster for swapfile by mistake

+181 -84
+18 -7
Documentation/admin-guide/cgroup-v2.rst
··· 1324 1324 pgmajfault 1325 1325 Number of major page faults incurred 1326 1326 1327 - workingset_refault 1328 - Number of refaults of previously evicted pages 1327 + workingset_refault_anon 1328 + Number of refaults of previously evicted anonymous pages. 1329 1329 1330 - workingset_activate 1331 - Number of refaulted pages that were immediately activated 1330 + workingset_refault_file 1331 + Number of refaults of previously evicted file pages. 1332 1332 1333 - workingset_restore 1334 - Number of restored pages which have been detected as an active 1335 - workingset before they got reclaimed. 1333 + workingset_activate_anon 1334 + Number of refaulted anonymous pages that were immediately 1335 + activated. 1336 + 1337 + workingset_activate_file 1338 + Number of refaulted file pages that were immediately activated. 1339 + 1340 + workingset_restore_anon 1341 + Number of restored anonymous pages which have been detected as 1342 + an active workingset before they got reclaimed. 1343 + 1344 + workingset_restore_file 1345 + Number of restored file pages which have been detected as an 1346 + active workingset before they got reclaimed. 1336 1347 1337 1348 workingset_nodereclaim 1338 1349 Number of times a shadow node has been reclaimed
+3 -3
arch/ia64/mm/init.c
··· 538 538 if (map_start < map_end) 539 539 memmap_init_zone((unsigned long)(map_end - map_start), 540 540 args->nid, args->zone, page_to_pfn(map_start), 541 - MEMMAP_EARLY, NULL); 541 + MEMINIT_EARLY, NULL); 542 542 return 0; 543 543 } 544 544 ··· 547 547 unsigned long start_pfn) 548 548 { 549 549 if (!vmem_map) { 550 - memmap_init_zone(size, nid, zone, start_pfn, MEMMAP_EARLY, 551 - NULL); 550 + memmap_init_zone(size, nid, zone, start_pfn, 551 + MEMINIT_EARLY, NULL); 552 552 } else { 553 553 struct page *start; 554 554 struct memmap_init_callback_data args;
+30 -12
arch/s390/include/asm/pgtable.h
··· 1260 1260 1261 1261 #define pgd_offset(mm, address) pgd_offset_raw(READ_ONCE((mm)->pgd), address) 1262 1262 1263 - static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address) 1263 + static inline p4d_t *p4d_offset_lockless(pgd_t *pgdp, pgd_t pgd, unsigned long address) 1264 1264 { 1265 - if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R1) 1266 - return (p4d_t *) pgd_deref(*pgd) + p4d_index(address); 1267 - return (p4d_t *) pgd; 1265 + if ((pgd_val(pgd) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R1) 1266 + return (p4d_t *) pgd_deref(pgd) + p4d_index(address); 1267 + return (p4d_t *) pgdp; 1268 + } 1269 + #define p4d_offset_lockless p4d_offset_lockless 1270 + 1271 + static inline p4d_t *p4d_offset(pgd_t *pgdp, unsigned long address) 1272 + { 1273 + return p4d_offset_lockless(pgdp, *pgdp, address); 1268 1274 } 1269 1275 1270 - static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address) 1276 + static inline pud_t *pud_offset_lockless(p4d_t *p4dp, p4d_t p4d, unsigned long address) 1271 1277 { 1272 - if ((p4d_val(*p4d) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R2) 1273 - return (pud_t *) p4d_deref(*p4d) + pud_index(address); 1274 - return (pud_t *) p4d; 1278 + if ((p4d_val(p4d) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R2) 1279 + return (pud_t *) p4d_deref(p4d) + pud_index(address); 1280 + return (pud_t *) p4dp; 1281 + } 1282 + #define pud_offset_lockless pud_offset_lockless 1283 + 1284 + static inline pud_t *pud_offset(p4d_t *p4dp, unsigned long address) 1285 + { 1286 + return pud_offset_lockless(p4dp, *p4dp, address); 1275 1287 } 1276 1288 #define pud_offset pud_offset 1277 1289 1278 - static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) 1290 + static inline pmd_t *pmd_offset_lockless(pud_t *pudp, pud_t pud, unsigned long address) 1279 1291 { 1280 - if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R3) 1281 - return (pmd_t *) pud_deref(*pud) + pmd_index(address); 1282 - return (pmd_t *) pud; 1292 + if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) >= _REGION_ENTRY_TYPE_R3) 1293 + return (pmd_t *) pud_deref(pud) + pmd_index(address); 1294 + return (pmd_t *) pudp; 1295 + } 1296 + #define pmd_offset_lockless pmd_offset_lockless 1297 + 1298 + static inline pmd_t *pmd_offset(pud_t *pudp, unsigned long address) 1299 + { 1300 + return pmd_offset_lockless(pudp, *pudp, address); 1283 1301 } 1284 1302 #define pmd_offset pmd_offset 1285 1303
+1 -1
arch/x86/lib/usercopy_64.c
··· 120 120 */ 121 121 if (size < 8) { 122 122 if (!IS_ALIGNED(dest, 4) || size != 4) 123 - clean_cache_range(dst, 1); 123 + clean_cache_range(dst, size); 124 124 } else { 125 125 if (!IS_ALIGNED(dest, 8)) { 126 126 dest = ALIGN(dest, boot_cpu_data.x86_clflush_size);
+55 -30
drivers/base/node.c
··· 761 761 return pfn_to_nid(pfn); 762 762 } 763 763 764 + static int do_register_memory_block_under_node(int nid, 765 + struct memory_block *mem_blk) 766 + { 767 + int ret; 768 + 769 + /* 770 + * If this memory block spans multiple nodes, we only indicate 771 + * the last processed node. 772 + */ 773 + mem_blk->nid = nid; 774 + 775 + ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj, 776 + &mem_blk->dev.kobj, 777 + kobject_name(&mem_blk->dev.kobj)); 778 + if (ret) 779 + return ret; 780 + 781 + return sysfs_create_link_nowarn(&mem_blk->dev.kobj, 782 + &node_devices[nid]->dev.kobj, 783 + kobject_name(&node_devices[nid]->dev.kobj)); 784 + } 785 + 764 786 /* register memory section under specified node if it spans that node */ 765 - static int register_mem_sect_under_node(struct memory_block *mem_blk, 766 - void *arg) 787 + static int register_mem_block_under_node_early(struct memory_block *mem_blk, 788 + void *arg) 767 789 { 768 790 unsigned long memory_block_pfns = memory_block_size_bytes() / PAGE_SIZE; 769 791 unsigned long start_pfn = section_nr_to_pfn(mem_blk->start_section_nr); 770 792 unsigned long end_pfn = start_pfn + memory_block_pfns - 1; 771 - int ret, nid = *(int *)arg; 793 + int nid = *(int *)arg; 772 794 unsigned long pfn; 773 795 774 796 for (pfn = start_pfn; pfn <= end_pfn; pfn++) { ··· 807 785 } 808 786 809 787 /* 810 - * We need to check if page belongs to nid only for the boot 811 - * case, during hotplug we know that all pages in the memory 812 - * block belong to the same node. 788 + * We need to check if page belongs to nid only at the boot 789 + * case because node's ranges can be interleaved. 813 790 */ 814 - if (system_state == SYSTEM_BOOTING) { 815 - page_nid = get_nid_for_pfn(pfn); 816 - if (page_nid < 0) 817 - continue; 818 - if (page_nid != nid) 819 - continue; 820 - } 791 + page_nid = get_nid_for_pfn(pfn); 792 + if (page_nid < 0) 793 + continue; 794 + if (page_nid != nid) 795 + continue; 821 796 822 - /* 823 - * If this memory block spans multiple nodes, we only indicate 824 - * the last processed node. 825 - */ 826 - mem_blk->nid = nid; 827 - 828 - ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj, 829 - &mem_blk->dev.kobj, 830 - kobject_name(&mem_blk->dev.kobj)); 831 - if (ret) 832 - return ret; 833 - 834 - return sysfs_create_link_nowarn(&mem_blk->dev.kobj, 835 - &node_devices[nid]->dev.kobj, 836 - kobject_name(&node_devices[nid]->dev.kobj)); 797 + return do_register_memory_block_under_node(nid, mem_blk); 837 798 } 838 799 /* mem section does not span the specified node */ 839 800 return 0; 801 + } 802 + 803 + /* 804 + * During hotplug we know that all pages in the memory block belong to the same 805 + * node. 806 + */ 807 + static int register_mem_block_under_node_hotplug(struct memory_block *mem_blk, 808 + void *arg) 809 + { 810 + int nid = *(int *)arg; 811 + 812 + return do_register_memory_block_under_node(nid, mem_blk); 840 813 } 841 814 842 815 /* ··· 849 832 kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); 850 833 } 851 834 852 - int link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn) 835 + int link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn, 836 + enum meminit_context context) 853 837 { 838 + walk_memory_blocks_func_t func; 839 + 840 + if (context == MEMINIT_HOTPLUG) 841 + func = register_mem_block_under_node_hotplug; 842 + else 843 + func = register_mem_block_under_node_early; 844 + 854 845 return walk_memory_blocks(PFN_PHYS(start_pfn), 855 846 PFN_PHYS(end_pfn - start_pfn), (void *)&nid, 856 - register_mem_sect_under_node); 847 + func); 857 848 } 858 849 859 850 #ifdef CONFIG_HUGETLBFS
+1 -1
include/linux/mm.h
··· 2416 2416 2417 2417 extern void set_dma_reserve(unsigned long new_dma_reserve); 2418 2418 extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long, 2419 - enum memmap_context, struct vmem_altmap *); 2419 + enum meminit_context, struct vmem_altmap *); 2420 2420 extern void setup_per_zone_wmarks(void); 2421 2421 extern int __meminit init_per_zone_wmark_min(void); 2422 2422 extern void mem_init(void);
+8 -3
include/linux/mmzone.h
··· 824 824 unsigned int alloc_flags); 825 825 bool zone_watermark_ok_safe(struct zone *z, unsigned int order, 826 826 unsigned long mark, int highest_zoneidx); 827 - enum memmap_context { 828 - MEMMAP_EARLY, 829 - MEMMAP_HOTPLUG, 827 + /* 828 + * Memory initialization context, use to differentiate memory added by 829 + * the platform statically or via memory hotplug interface. 830 + */ 831 + enum meminit_context { 832 + MEMINIT_EARLY, 833 + MEMINIT_HOTPLUG, 830 834 }; 835 + 831 836 extern void init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, 832 837 unsigned long size); 833 838
+7 -4
include/linux/node.h
··· 99 99 typedef void (*node_registration_func_t)(struct node *); 100 100 101 101 #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_NUMA) 102 - extern int link_mem_sections(int nid, unsigned long start_pfn, 103 - unsigned long end_pfn); 102 + int link_mem_sections(int nid, unsigned long start_pfn, 103 + unsigned long end_pfn, 104 + enum meminit_context context); 104 105 #else 105 106 static inline int link_mem_sections(int nid, unsigned long start_pfn, 106 - unsigned long end_pfn) 107 + unsigned long end_pfn, 108 + enum meminit_context context) 107 109 { 108 110 return 0; 109 111 } ··· 130 128 if (error) 131 129 return error; 132 130 /* link memory sections under this node */ 133 - error = link_mem_sections(nid, start_pfn, end_pfn); 131 + error = link_mem_sections(nid, start_pfn, end_pfn, 132 + MEMINIT_EARLY); 134 133 } 135 134 136 135 return error;
+10
include/linux/pgtable.h
··· 1427 1427 #define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED) 1428 1428 #endif 1429 1429 1430 + #ifndef p4d_offset_lockless 1431 + #define p4d_offset_lockless(pgdp, pgd, address) p4d_offset(&(pgd), address) 1432 + #endif 1433 + #ifndef pud_offset_lockless 1434 + #define pud_offset_lockless(p4dp, p4d, address) pud_offset(&(p4d), address) 1435 + #endif 1436 + #ifndef pmd_offset_lockless 1437 + #define pmd_offset_lockless(pudp, pud, address) pmd_offset(&(pud), address) 1438 + #endif 1439 + 1430 1440 /* 1431 1441 * p?d_leaf() - true if this entry is a final mapping to a physical address. 1432 1442 * This differs from p?d_huge() by the fact that they are always available (if
+1
lib/memregion.c
··· 2 2 /* identifiers for device / performance-differentiated memory regions */ 3 3 #include <linux/idr.h> 4 4 #include <linux/types.h> 5 + #include <linux/memregion.h> 5 6 6 7 static DEFINE_IDA(memregion_ids); 7 8
+24
lib/string.c
··· 272 272 } 273 273 EXPORT_SYMBOL(strscpy_pad); 274 274 275 + /** 276 + * stpcpy - copy a string from src to dest returning a pointer to the new end 277 + * of dest, including src's %NUL-terminator. May overrun dest. 278 + * @dest: pointer to end of string being copied into. Must be large enough 279 + * to receive copy. 280 + * @src: pointer to the beginning of string being copied from. Must not overlap 281 + * dest. 282 + * 283 + * stpcpy differs from strcpy in a key way: the return value is a pointer 284 + * to the new %NUL-terminating character in @dest. (For strcpy, the return 285 + * value is a pointer to the start of @dest). This interface is considered 286 + * unsafe as it doesn't perform bounds checking of the inputs. As such it's 287 + * not recommended for usage. Instead, its definition is provided in case 288 + * the compiler lowers other libcalls to stpcpy. 289 + */ 290 + char *stpcpy(char *__restrict__ dest, const char *__restrict__ src); 291 + char *stpcpy(char *__restrict__ dest, const char *__restrict__ src) 292 + { 293 + while ((*dest++ = *src++) != '\0') 294 + /* nothing */; 295 + return --dest; 296 + } 297 + EXPORT_SYMBOL(stpcpy); 298 + 275 299 #ifndef __HAVE_ARCH_STRCAT 276 300 /** 277 301 * strcat - Append one %NUL-terminated string to another
+9 -9
mm/gup.c
··· 2485 2485 return 1; 2486 2486 } 2487 2487 2488 - static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end, 2488 + static int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, unsigned long end, 2489 2489 unsigned int flags, struct page **pages, int *nr) 2490 2490 { 2491 2491 unsigned long next; 2492 2492 pmd_t *pmdp; 2493 2493 2494 - pmdp = pmd_offset(&pud, addr); 2494 + pmdp = pmd_offset_lockless(pudp, pud, addr); 2495 2495 do { 2496 2496 pmd_t pmd = READ_ONCE(*pmdp); 2497 2497 ··· 2528 2528 return 1; 2529 2529 } 2530 2530 2531 - static int gup_pud_range(p4d_t p4d, unsigned long addr, unsigned long end, 2531 + static int gup_pud_range(p4d_t *p4dp, p4d_t p4d, unsigned long addr, unsigned long end, 2532 2532 unsigned int flags, struct page **pages, int *nr) 2533 2533 { 2534 2534 unsigned long next; 2535 2535 pud_t *pudp; 2536 2536 2537 - pudp = pud_offset(&p4d, addr); 2537 + pudp = pud_offset_lockless(p4dp, p4d, addr); 2538 2538 do { 2539 2539 pud_t pud = READ_ONCE(*pudp); 2540 2540 ··· 2549 2549 if (!gup_huge_pd(__hugepd(pud_val(pud)), addr, 2550 2550 PUD_SHIFT, next, flags, pages, nr)) 2551 2551 return 0; 2552 - } else if (!gup_pmd_range(pud, addr, next, flags, pages, nr)) 2552 + } else if (!gup_pmd_range(pudp, pud, addr, next, flags, pages, nr)) 2553 2553 return 0; 2554 2554 } while (pudp++, addr = next, addr != end); 2555 2555 2556 2556 return 1; 2557 2557 } 2558 2558 2559 - static int gup_p4d_range(pgd_t pgd, unsigned long addr, unsigned long end, 2559 + static int gup_p4d_range(pgd_t *pgdp, pgd_t pgd, unsigned long addr, unsigned long end, 2560 2560 unsigned int flags, struct page **pages, int *nr) 2561 2561 { 2562 2562 unsigned long next; 2563 2563 p4d_t *p4dp; 2564 2564 2565 - p4dp = p4d_offset(&pgd, addr); 2565 + p4dp = p4d_offset_lockless(pgdp, pgd, addr); 2566 2566 do { 2567 2567 p4d_t p4d = READ_ONCE(*p4dp); 2568 2568 ··· 2574 2574 if (!gup_huge_pd(__hugepd(p4d_val(p4d)), addr, 2575 2575 P4D_SHIFT, next, flags, pages, nr)) 2576 2576 return 0; 2577 - } else if (!gup_pud_range(p4d, addr, next, flags, pages, nr)) 2577 + } else if (!gup_pud_range(p4dp, p4d, addr, next, flags, pages, nr)) 2578 2578 return 0; 2579 2579 } while (p4dp++, addr = next, addr != end); 2580 2580 ··· 2602 2602 if (!gup_huge_pd(__hugepd(pgd_val(pgd)), addr, 2603 2603 PGDIR_SHIFT, next, flags, pages, nr)) 2604 2604 return; 2605 - } else if (!gup_p4d_range(pgd, addr, next, flags, pages, nr)) 2605 + } else if (!gup_p4d_range(pgdp, pgd, addr, next, flags, pages, nr)) 2606 2606 return; 2607 2607 } while (pgdp++, addr = next, addr != end); 2608 2608 }
+2 -2
mm/memcontrol.c
··· 1538 1538 memcg_page_state(memcg, WORKINGSET_ACTIVATE_ANON)); 1539 1539 seq_buf_printf(&s, "workingset_activate_file %lu\n", 1540 1540 memcg_page_state(memcg, WORKINGSET_ACTIVATE_FILE)); 1541 - seq_buf_printf(&s, "workingset_restore %lu\n", 1541 + seq_buf_printf(&s, "workingset_restore_anon %lu\n", 1542 1542 memcg_page_state(memcg, WORKINGSET_RESTORE_ANON)); 1543 - seq_buf_printf(&s, "workingset_restore %lu\n", 1543 + seq_buf_printf(&s, "workingset_restore_file %lu\n", 1544 1544 memcg_page_state(memcg, WORKINGSET_RESTORE_FILE)); 1545 1545 seq_buf_printf(&s, "workingset_nodereclaim %lu\n", 1546 1546 memcg_page_state(memcg, WORKINGSET_NODERECLAIM));
+3 -2
mm/memory_hotplug.c
··· 729 729 * are reserved so nobody should be touching them so we should be safe 730 730 */ 731 731 memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, 732 - MEMMAP_HOTPLUG, altmap); 732 + MEMINIT_HOTPLUG, altmap); 733 733 734 734 set_zone_contiguous(zone); 735 735 } ··· 1080 1080 } 1081 1081 1082 1082 /* link memory sections under this node.*/ 1083 - ret = link_mem_sections(nid, PFN_DOWN(start), PFN_UP(start + size - 1)); 1083 + ret = link_mem_sections(nid, PFN_DOWN(start), PFN_UP(start + size - 1), 1084 + MEMINIT_HOTPLUG); 1084 1085 BUG_ON(ret); 1085 1086 1086 1087 /* create new memmap entry */
+3 -4
mm/migrate.c
··· 1446 1446 * Capture required information that might get lost 1447 1447 * during migration. 1448 1448 */ 1449 - is_thp = PageTransHuge(page); 1449 + is_thp = PageTransHuge(page) && !PageHuge(page); 1450 1450 nr_subpages = thp_nr_pages(page); 1451 1451 cond_resched(); 1452 1452 ··· 1472 1472 * we encounter them after the rest of the list 1473 1473 * is processed. 1474 1474 */ 1475 - if (PageTransHuge(page) && !PageHuge(page)) { 1475 + if (is_thp) { 1476 1476 lock_page(page); 1477 1477 rc = split_huge_page_to_list(page, from); 1478 1478 unlock_page(page); ··· 1481 1481 nr_thp_split++; 1482 1482 goto retry; 1483 1483 } 1484 - } 1485 - if (is_thp) { 1484 + 1486 1485 nr_thp_failed++; 1487 1486 nr_failed += nr_subpages; 1488 1487 goto out;
+5 -5
mm/page_alloc.c
··· 5975 5975 * done. Non-atomic initialization, single-pass. 5976 5976 */ 5977 5977 void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, 5978 - unsigned long start_pfn, enum memmap_context context, 5978 + unsigned long start_pfn, enum meminit_context context, 5979 5979 struct vmem_altmap *altmap) 5980 5980 { 5981 5981 unsigned long pfn, end_pfn = start_pfn + size; ··· 6007 6007 * There can be holes in boot-time mem_map[]s handed to this 6008 6008 * function. They do not exist on hotplugged memory. 6009 6009 */ 6010 - if (context == MEMMAP_EARLY) { 6010 + if (context == MEMINIT_EARLY) { 6011 6011 if (overlap_memmap_init(zone, &pfn)) 6012 6012 continue; 6013 6013 if (defer_init(nid, pfn, end_pfn)) ··· 6016 6016 6017 6017 page = pfn_to_page(pfn); 6018 6018 __init_single_page(page, pfn, zone, nid); 6019 - if (context == MEMMAP_HOTPLUG) 6019 + if (context == MEMINIT_HOTPLUG) 6020 6020 __SetPageReserved(page); 6021 6021 6022 6022 /* ··· 6099 6099 * check here not to call set_pageblock_migratetype() against 6100 6100 * pfn out of zone. 6101 6101 * 6102 - * Please note that MEMMAP_HOTPLUG path doesn't clear memmap 6102 + * Please note that MEMINIT_HOTPLUG path doesn't clear memmap 6103 6103 * because this is done early in section_activate() 6104 6104 */ 6105 6105 if (!(pfn & (pageblock_nr_pages - 1))) { ··· 6137 6137 if (end_pfn > start_pfn) { 6138 6138 size = end_pfn - start_pfn; 6139 6139 memmap_init_zone(size, nid, zone, start_pfn, 6140 - MEMMAP_EARLY, NULL); 6140 + MEMINIT_EARLY, NULL); 6141 6141 } 6142 6142 } 6143 6143 }
+1 -1
mm/swapfile.c
··· 1078 1078 goto nextsi; 1079 1079 } 1080 1080 if (size == SWAPFILE_CLUSTER) { 1081 - if (!(si->flags & SWP_FS)) 1081 + if (si->flags & SWP_BLKDEV) 1082 1082 n_ret = swap_alloc_cluster(si, swp_entries); 1083 1083 } else 1084 1084 n_ret = scan_swap_map_slots(si, SWAP_HAS_CACHE,