Skip to content

Commit 17568b8

Browse files
akpm00sfrothwell
authored andcommitted
mm-fs-introduce-mapping_gfp_constraint-checkpatch-fixes
WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#46: FILE: drivers/gpu/drm/drm_gem.c:494: + BUG_ON(mapping_gfp_constraint(mapping, __GFP_DMA32) && WARNING: line over 80 characters torvalds#73: FILE: fs/btrfs/compression.c:485: + page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS)); WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() torvalds#183: FILE: fs/logfs/segment.c:60: + BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS)); WARNING: line over 80 characters torvalds#228: FILE: fs/nilfs2/inode.c:359: + mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS)); WARNING: line over 80 characters torvalds#237: FILE: fs/nilfs2/inode.c:525: + mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS)); WARNING: line over 80 characters torvalds#249: FILE: fs/ntfs/file.c:529: + mapping_gfp_constraint(mapping, GFP_KERNEL)); WARNING: line over 80 characters torvalds#261: FILE: fs/splice.c:363: + mapping_gfp_constraint(mapping, GFP_KERNEL)); WARNING: line over 80 characters torvalds#290: FILE: mm/filemap.c:1725: + mapping_gfp_constraint(mapping, GFP_KERNEL)); total: 0 errors, 8 warnings, 205 lines checked ./patches/mm-fs-introduce-mapping_gfp_constraint.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 Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 75dc0f4 commit 17568b8

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

fs/btrfs/compression.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,12 @@ static noinline int add_ra_bio_pages(struct inode *inode,
482482
goto next;
483483
}
484484

485-
page = __page_cache_alloc(mapping_gfp_constraint(mapping, ~__GFP_FS));
485+
page = __page_cache_alloc(mapping_gfp_constraint(mapping,
486+
~__GFP_FS));
486487
if (!page)
487488
break;
488489

489-
if (add_to_page_cache_lru(page, mapping, pg_index,
490-
GFP_NOFS)) {
490+
if (add_to_page_cache_lru(page, mapping, pg_index, GFP_NOFS)) {
491491
page_cache_release(page);
492492
goto next;
493493
}

fs/nilfs2/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
356356
goto failed;
357357

358358
mapping_set_gfp_mask(inode->i_mapping,
359-
mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));
359+
mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));
360360

361361
root = NILFS_I(dir)->i_root;
362362
ii = NILFS_I(inode);
@@ -522,7 +522,7 @@ static int __nilfs_read_inode(struct super_block *sb,
522522
up_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem);
523523
nilfs_set_inode_flags(inode);
524524
mapping_set_gfp_mask(inode->i_mapping,
525-
mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));
525+
mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS));
526526
return 0;
527527

528528
failed_unmap:

fs/ntfs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping,
525525
}
526526
}
527527
err = add_to_page_cache_lru(*cached_page, mapping,
528-
index,
529-
mapping_gfp_constraint(mapping, GFP_KERNEL));
528+
index,
529+
mapping_gfp_constraint(mapping, GFP_KERNEL));
530530
if (unlikely(err)) {
531531
if (err == -EEXIST)
532532
continue;

fs/splice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
360360
break;
361361

362362
error = add_to_page_cache_lru(page, mapping, index,
363-
mapping_gfp_constraint(mapping, GFP_KERNEL));
363+
mapping_gfp_constraint(mapping, GFP_KERNEL));
364364
if (unlikely(error)) {
365365
page_cache_release(page);
366366
if (error == -EEXIST)

mm/filemap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,7 @@ static ssize_t do_generic_file_read(struct file *filp, loff_t *ppos,
17221722
goto out;
17231723
}
17241724
error = add_to_page_cache_lru(page, mapping, index,
1725-
mapping_gfp_constraint(mapping, GFP_KERNEL));
1725+
mapping_gfp_constraint(mapping, GFP_KERNEL));
17261726
if (error) {
17271727
page_cache_release(page);
17281728
if (error == -EEXIST) {

0 commit comments

Comments
 (0)