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 Morton)

Merge misc fixes from Andrew Morton:
"Nine fixes"

* emailed patches from Andrew Morton akpm@linux-foundation.org>:
cris: convert ffs from an object-like macro to a function-like macro
hfsplus: add HFSX subfolder count support
tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly
MAINTAINERS: blackfin: add git repository
revert "kallsyms: fix absolute addresses for kASLR"
mm/Kconfig: fix URL for zsmalloc benchmark
fs/proc/base.c: fix GPF in /proc/$PID/map_files
mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block
mm: fix GFP_THISNODE callers and clarify

+95 -26
+1
MAINTAINERS
··· 1738 1738 BLACKFIN ARCHITECTURE 1739 1739 M: Steven Miao <realmz6@gmail.com> 1740 1740 L: adi-buildroot-devel@lists.sourceforge.net 1741 + T: git git://git.code.sf.net/p/adi-linux/code 1741 1742 W: http://blackfin.uclinux.org 1742 1743 S: Supported 1743 1744 F: arch/blackfin/
+1 -1
arch/cris/include/asm/bitops.h
··· 144 144 * definition, which doesn't have the same semantics. We don't want to 145 145 * use -fno-builtin, so just hide the name ffs. 146 146 */ 147 - #define ffs kernel_ffs 147 + #define ffs(x) kernel_ffs(x) 148 148 149 149 #include <asm-generic/bitops/fls.h> 150 150 #include <asm-generic/bitops/__fls.h>
+1 -1
arch/ia64/kernel/uncached.c
··· 98 98 /* attempt to allocate a granule's worth of cached memory pages */ 99 99 100 100 page = alloc_pages_exact_node(nid, 101 - GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, 101 + GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE, 102 102 IA64_GRANULE_SHIFT-PAGE_SHIFT); 103 103 if (!page) { 104 104 mutex_unlock(&uc_pool->add_chunk_mutex);
+2 -1
arch/powerpc/platforms/cell/ras.c
··· 123 123 124 124 area->nid = nid; 125 125 area->order = order; 126 - area->pages = alloc_pages_exact_node(area->nid, GFP_KERNEL|GFP_THISNODE, 126 + area->pages = alloc_pages_exact_node(area->nid, 127 + GFP_KERNEL|__GFP_THISNODE, 127 128 area->order); 128 129 129 130 if (!area->pages) {
+1 -1
drivers/misc/sgi-xp/xpc_uv.c
··· 240 240 241 241 nid = cpu_to_node(cpu); 242 242 page = alloc_pages_exact_node(nid, 243 - GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, 243 + GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE, 244 244 pg_order); 245 245 if (page == NULL) { 246 246 dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to alloc %d "
+41
fs/hfsplus/catalog.c
··· 103 103 folder = &entry->folder; 104 104 memset(folder, 0, sizeof(*folder)); 105 105 folder->type = cpu_to_be16(HFSPLUS_FOLDER); 106 + if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags)) 107 + folder->flags |= cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT); 106 108 folder->id = cpu_to_be32(inode->i_ino); 107 109 HFSPLUS_I(inode)->create_date = 108 110 folder->create_date = ··· 205 203 return hfs_brec_find(fd, hfs_find_rec_by_key); 206 204 } 207 205 206 + static void hfsplus_subfolders_inc(struct inode *dir) 207 + { 208 + struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); 209 + 210 + if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags)) { 211 + /* 212 + * Increment subfolder count. Note, the value is only meaningful 213 + * for folders with HFSPLUS_HAS_FOLDER_COUNT flag set. 214 + */ 215 + HFSPLUS_I(dir)->subfolders++; 216 + } 217 + } 218 + 219 + static void hfsplus_subfolders_dec(struct inode *dir) 220 + { 221 + struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); 222 + 223 + if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags)) { 224 + /* 225 + * Decrement subfolder count. Note, the value is only meaningful 226 + * for folders with HFSPLUS_HAS_FOLDER_COUNT flag set. 227 + * 228 + * Check for zero. Some subfolders may have been created 229 + * by an implementation ignorant of this counter. 230 + */ 231 + if (HFSPLUS_I(dir)->subfolders) 232 + HFSPLUS_I(dir)->subfolders--; 233 + } 234 + } 235 + 208 236 int hfsplus_create_cat(u32 cnid, struct inode *dir, 209 237 struct qstr *str, struct inode *inode) 210 238 { ··· 279 247 goto err1; 280 248 281 249 dir->i_size++; 250 + if (S_ISDIR(inode->i_mode)) 251 + hfsplus_subfolders_inc(dir); 282 252 dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; 283 253 hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY); 284 254 ··· 370 336 goto out; 371 337 372 338 dir->i_size--; 339 + if (type == HFSPLUS_FOLDER) 340 + hfsplus_subfolders_dec(dir); 373 341 dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; 374 342 hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY); 375 343 ··· 416 380 417 381 hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset, 418 382 src_fd.entrylength); 383 + type = be16_to_cpu(entry.type); 419 384 420 385 /* create new dir entry with the data from the old entry */ 421 386 hfsplus_cat_build_key(sb, dst_fd.search_key, dst_dir->i_ino, dst_name); ··· 431 394 if (err) 432 395 goto out; 433 396 dst_dir->i_size++; 397 + if (type == HFSPLUS_FOLDER) 398 + hfsplus_subfolders_inc(dst_dir); 434 399 dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC; 435 400 436 401 /* finally remove the old entry */ ··· 444 405 if (err) 445 406 goto out; 446 407 src_dir->i_size--; 408 + if (type == HFSPLUS_FOLDER) 409 + hfsplus_subfolders_dec(src_dir); 447 410 src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC; 448 411 449 412 /* remove old thread entry */
+1
fs/hfsplus/hfsplus_fs.h
··· 242 242 */ 243 243 sector_t fs_blocks; 244 244 u8 userflags; /* BSD user file flags */ 245 + u32 subfolders; /* Subfolder count (HFSX only) */ 245 246 struct list_head open_dir_list; 246 247 loff_t phys_size; 247 248
+4 -2
fs/hfsplus/hfsplus_raw.h
··· 261 261 struct DInfo user_info; 262 262 struct DXInfo finder_info; 263 263 __be32 text_encoding; 264 - u32 reserved; 264 + __be32 subfolders; /* Subfolder count in HFSX. Reserved in HFS+. */ 265 265 } __packed; 266 266 267 267 /* HFS file info (stolen from hfs.h) */ ··· 301 301 struct hfsplus_fork_raw rsrc_fork; 302 302 } __packed; 303 303 304 - /* File attribute bits */ 304 + /* File and folder flag bits */ 305 305 #define HFSPLUS_FILE_LOCKED 0x0001 306 306 #define HFSPLUS_FILE_THREAD_EXISTS 0x0002 307 307 #define HFSPLUS_XATTR_EXISTS 0x0004 308 308 #define HFSPLUS_ACL_EXISTS 0x0008 309 + #define HFSPLUS_HAS_FOLDER_COUNT 0x0010 /* Folder has subfolder count 310 + * (HFSX only) */ 309 311 310 312 /* HFS+ catalog thread (part of a cat_entry) */ 311 313 struct hfsplus_cat_thread {
+9
fs/hfsplus/inode.c
··· 375 375 hip->extent_state = 0; 376 376 hip->flags = 0; 377 377 hip->userflags = 0; 378 + hip->subfolders = 0; 378 379 memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec)); 379 380 memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec)); 380 381 hip->alloc_blocks = 0; ··· 495 494 inode->i_ctime = hfsp_mt2ut(folder->attribute_mod_date); 496 495 HFSPLUS_I(inode)->create_date = folder->create_date; 497 496 HFSPLUS_I(inode)->fs_blocks = 0; 497 + if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) { 498 + HFSPLUS_I(inode)->subfolders = 499 + be32_to_cpu(folder->subfolders); 500 + } 498 501 inode->i_op = &hfsplus_dir_inode_operations; 499 502 inode->i_fop = &hfsplus_dir_operations; 500 503 } else if (type == HFSPLUS_FILE) { ··· 571 566 folder->content_mod_date = hfsp_ut2mt(inode->i_mtime); 572 567 folder->attribute_mod_date = hfsp_ut2mt(inode->i_ctime); 573 568 folder->valence = cpu_to_be32(inode->i_size - 2); 569 + if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) { 570 + folder->subfolders = 571 + cpu_to_be32(HFSPLUS_I(inode)->subfolders); 572 + } 574 573 hfs_bnode_write(fd.bnode, &entry, fd.entryoffset, 575 574 sizeof(struct hfsplus_cat_folder)); 576 575 } else if (HFSPLUS_IS_RSRC(inode)) {
+1
fs/proc/base.c
··· 1824 1824 if (rc) 1825 1825 goto out_mmput; 1826 1826 1827 + rc = -ENOENT; 1827 1828 down_read(&mm->mmap_sem); 1828 1829 vma = find_exact_vma(mm, vm_start, vm_end); 1829 1830 if (vma && vma->vm_file) {
+4
include/linux/gfp.h
··· 123 123 __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \ 124 124 __GFP_NO_KSWAPD) 125 125 126 + /* 127 + * GFP_THISNODE does not perform any reclaim, you most likely want to 128 + * use __GFP_THISNODE to allocate from a given node without fallback! 129 + */ 126 130 #ifdef CONFIG_NUMA 127 131 #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) 128 132 #else
+2 -2
include/linux/mmzone.h
··· 590 590 591 591 /* 592 592 * The NUMA zonelists are doubled because we need zonelists that restrict the 593 - * allocations to a single node for GFP_THISNODE. 593 + * allocations to a single node for __GFP_THISNODE. 594 594 * 595 595 * [0] : Zonelist with fallback 596 - * [1] : No fallback (GFP_THISNODE) 596 + * [1] : No fallback (__GFP_THISNODE) 597 597 */ 598 598 #define MAX_ZONELISTS 2 599 599
+1 -1
include/linux/slab.h
··· 410 410 * 411 411 * %GFP_NOWAIT - Allocation will not sleep. 412 412 * 413 - * %GFP_THISNODE - Allocate node-local memory only. 413 + * %__GFP_THISNODE - Allocate node-local memory only. 414 414 * 415 415 * %GFP_DMA - Allocation suitable for DMA. 416 416 * Should only be used for kmalloc() caches. Otherwise, use a
+2 -2
kernel/profile.c
··· 549 549 struct page *page; 550 550 551 551 page = alloc_pages_exact_node(node, 552 - GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, 552 + GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE, 553 553 0); 554 554 if (!page) 555 555 goto out_cleanup; 556 556 per_cpu(cpu_profile_hits, cpu)[1] 557 557 = (struct profile_hit *)page_address(page); 558 558 page = alloc_pages_exact_node(node, 559 - GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, 559 + GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE, 560 560 0); 561 561 if (!page) 562 562 goto out_cleanup;
+2 -2
mm/Kconfig
··· 575 575 then you should select this. This causes zsmalloc to use page table 576 576 mapping rather than copying for object mapping. 577 577 578 - You can check speed with zsmalloc benchmark[1]. 579 - [1] https://github.com/spartacus06/zsmalloc 578 + You can check speed with zsmalloc benchmark: 579 + https://github.com/spartacus06/zsmapbench
+13 -7
mm/compaction.c
··· 251 251 { 252 252 int nr_scanned = 0, total_isolated = 0; 253 253 struct page *cursor, *valid_page = NULL; 254 - unsigned long nr_strict_required = end_pfn - blockpfn; 255 254 unsigned long flags; 256 255 bool locked = false; 257 256 ··· 263 264 264 265 nr_scanned++; 265 266 if (!pfn_valid_within(blockpfn)) 266 - continue; 267 + goto isolate_fail; 268 + 267 269 if (!valid_page) 268 270 valid_page = page; 269 271 if (!PageBuddy(page)) 270 - continue; 272 + goto isolate_fail; 271 273 272 274 /* 273 275 * The zone lock must be held to isolate freepages. ··· 289 289 290 290 /* Recheck this is a buddy page under lock */ 291 291 if (!PageBuddy(page)) 292 - continue; 292 + goto isolate_fail; 293 293 294 294 /* Found a free page, break it into order-0 pages */ 295 295 isolated = split_free_page(page); 296 - if (!isolated && strict) 297 - break; 298 296 total_isolated += isolated; 299 297 for (i = 0; i < isolated; i++) { 300 298 list_add(&page->lru, freelist); ··· 303 305 if (isolated) { 304 306 blockpfn += isolated - 1; 305 307 cursor += isolated - 1; 308 + continue; 306 309 } 310 + 311 + isolate_fail: 312 + if (strict) 313 + break; 314 + else 315 + continue; 316 + 307 317 } 308 318 309 319 trace_mm_compaction_isolate_freepages(nr_scanned, total_isolated); ··· 321 315 * pages requested were isolated. If there were any failures, 0 is 322 316 * returned and CMA will fail. 323 317 */ 324 - if (strict && nr_strict_required > total_isolated) 318 + if (strict && blockpfn < end_pfn) 325 319 total_isolated = 0; 326 320 327 321 if (locked)
+6 -5
mm/migrate.c
··· 1158 1158 pm->node); 1159 1159 else 1160 1160 return alloc_pages_exact_node(pm->node, 1161 - GFP_HIGHUSER_MOVABLE | GFP_THISNODE, 0); 1161 + GFP_HIGHUSER_MOVABLE | __GFP_THISNODE, 0); 1162 1162 } 1163 1163 1164 1164 /* ··· 1544 1544 struct page *newpage; 1545 1545 1546 1546 newpage = alloc_pages_exact_node(nid, 1547 - (GFP_HIGHUSER_MOVABLE | GFP_THISNODE | 1548 - __GFP_NOMEMALLOC | __GFP_NORETRY | 1549 - __GFP_NOWARN) & 1547 + (GFP_HIGHUSER_MOVABLE | 1548 + __GFP_THISNODE | __GFP_NOMEMALLOC | 1549 + __GFP_NORETRY | __GFP_NOWARN) & 1550 1550 ~GFP_IOFS, 0); 1551 1551 1552 1552 return newpage; ··· 1747 1747 goto out_dropref; 1748 1748 1749 1749 new_page = alloc_pages_node(node, 1750 - (GFP_TRANSHUGE | GFP_THISNODE) & ~__GFP_WAIT, HPAGE_PMD_ORDER); 1750 + (GFP_TRANSHUGE | __GFP_THISNODE) & ~__GFP_WAIT, 1751 + HPAGE_PMD_ORDER); 1751 1752 if (!new_page) 1752 1753 goto out_fail; 1753 1754
+2 -1
scripts/kallsyms.c
··· 330 330 printf("\tPTR\t_text + %#llx\n", 331 331 table[i].addr - _text); 332 332 else 333 - printf("\tPTR\t%#llx\n", table[i].addr); 333 + printf("\tPTR\t_text - %#llx\n", 334 + _text - table[i].addr); 334 335 } else { 335 336 printf("\tPTR\t%#llx\n", table[i].addr); 336 337 }
+1
tools/testing/selftests/ipc/msgque.c
··· 201 201 202 202 msgque.msq_id = msgget(msgque.key, IPC_CREAT | IPC_EXCL | 0666); 203 203 if (msgque.msq_id == -1) { 204 + err = -errno; 204 205 printf("Can't create queue\n"); 205 206 goto err_out; 206 207 }