The patch titled Subject: mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes has been added to the -mm tree. Its filename is mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #49: FILE: fs/mpage.c:139: + unsigned nr_pages; WARNING: line over 80 characters #96: FILE: fs/mpage.c:190: + if (buffer_mapped(map_bh) && block_in_file > args->first_logical_block && WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #98: FILE: fs/mpage.c:192: + unsigned map_offset = block_in_file - args->first_logical_block; WARNING: line over 80 characters #135: FILE: fs/mpage.c:296: + min_t(int, args->nr_pages, BIO_MAX_PAGES), args->gfp); ERROR: code indent should use tabs where possible #169: FILE: fs/mpage.c:321: +^I block_read_full_page(page, args->get_block);$ total: 1 errors, 4 warnings, 196 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/mpage-add-argument-structure-for-do_mpage_readpage.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN fs/mpage.c~mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes fs/mpage.c --- a/fs/mpage.c~mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes +++ a/fs/mpage.c @@ -136,7 +136,7 @@ map_buffer_to_page(struct page *page, st struct mpage_readpage_args { struct bio *bio; struct page *page; - unsigned nr_pages; + unsigned int nr_pages; sector_t last_block_in_bio; struct buffer_head map_bh; unsigned long first_logical_block; @@ -187,7 +187,8 @@ static struct bio *do_mpage_readpage(str * Map blocks using the result from the previous get_blocks call first. */ nblocks = map_bh->b_size >> blkbits; - if (buffer_mapped(map_bh) && block_in_file > args->first_logical_block && + if (buffer_mapped(map_bh) && + block_in_file > args->first_logical_block && block_in_file < (args->first_logical_block + nblocks)) { unsigned map_offset = block_in_file - args->first_logical_block; unsigned last = nblocks - map_offset; @@ -293,7 +294,9 @@ alloc_new: goto out; } args->bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), - min_t(int, args->nr_pages, BIO_MAX_PAGES), args->gfp); + min_t(int, args->nr_pages, + BIO_MAX_PAGES), + args->gfp); if (args->bio == NULL) goto confused; } @@ -318,7 +321,7 @@ confused: if (args->bio) args->bio = mpage_bio_submit(REQ_OP_READ, 0, args->bio); if (!PageUptodate(page)) - block_read_full_page(page, args->get_block); + block_read_full_page(page, args->get_block); else unlock_page(page); goto out; _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are i-need-old-gcc.patch zram-remove-bd_cap_synchronous_io-with-writeback-feature-v2-checkpatch-fixes.patch arm-arch-arm-include-asm-pageh-needs-personalityh.patch ocfs2-return-erofs-when-filesystem-becomes-read-only-checkpatch-fixes.patch mm.patch tools-modifying-page-types-to-include-shared-map-counts-checkpatch-fixes.patch tools-modifying-page-types-to-include-shared-map-counts-fix-checkpatch-fixes.patch tools-adding-support-for-idle-page-tracking-to-tool-fix.patch mpage-add-argument-structure-for-do_mpage_readpage-checkpatch-fixes.patch mm-drop-vm_bug_on-from-__get_free_pages-fix.patch mm-list_lruc-fold-__list_lru_count_one-into-its-caller.patch mm-fadvise-fix-signed-overflow-ubsan-complaint-fix.patch mm-sparsemem-defer-the-ms-section_mem_map-clearing-fix.patch mm-sparse-optimize-memmap-allocation-during-sparse_init-checkpatch-fixes.patch mm-sparse-abstract-sparse-buffer-allocations-fix.patch mm-sparse-abstract-sparse-buffer-allocations-fix-fix.patch mm-soft-offline-close-the-race-against-page-allocation-fix.patch mm-oom-distinguish-blockable-mode-for-mmu-notifiers-checkpatch-fixes.patch mm-oom-distinguish-blockable-mode-for-mmu-notifiers-fix.patch mm-zero-out-the-vma-in-vma_init.patch mm-calculate-deferred-pages-after-skipping-mirrored-memory-fix.patch list_lru-prefetch-neighboring-list-entries-before-acquiring-lock-fix.patch proc-kcore-hold-lock-during-read-fix.patch kernel-hung_taskc-allow-to-set-checking-interval-separately-from-timeout-fix.patch fs-epoll-robustify-irq-safety-with-lockdep_assert_irqs_enabled-fix.patch checkpatch-check-for-if-0-if-1-fix.patch checkpatch-warn-when-a-patch-doesnt-have-a-description-fix.patch fs-epoll-simply-config_net_rx_busy_poll-ifdefery-fix.patch linux-next-rejects.patch linux-next-git-rejects.patch mm-change-return-type-int-to-vm_fault_t-for-fault-handlers-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch slab-leaks3-default-y.patch