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

ext2: add warning when specifying nocheck option

The option nocheck(nocheck/check=none) is useless but considering
backwards compatibility it's better to print warning for a while
before completely remove from the code.

This patch add proper warning message for option 'nocheck' and
remove unnecessary comment/function declaration which is used for
removed option 'check'.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Chengguang Xu and committed by
Jan Kara
27e6ed54 1822193b

+3 -5
-2
fs/ext2/ext2.h
··· 748 748 unsigned long); 749 749 extern unsigned long ext2_count_free_blocks (struct super_block *); 750 750 extern unsigned long ext2_count_dirs (struct super_block *); 751 - extern void ext2_check_blocks_bitmap (struct super_block *); 752 751 extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, 753 752 unsigned int block_group, 754 753 struct buffer_head ** bh); ··· 770 771 extern struct inode * ext2_new_inode (struct inode *, umode_t, const struct qstr *); 771 772 extern void ext2_free_inode (struct inode *); 772 773 extern unsigned long ext2_count_free_inodes (struct super_block *); 773 - extern void ext2_check_inodes_bitmap (struct super_block *); 774 774 extern unsigned long ext2_count_free (struct buffer_head *, unsigned); 775 775 776 776 /* inode.c */
+3 -3
fs/ext2/super.c
··· 557 557 set_opt (opts->s_mount_opt, NO_UID32); 558 558 break; 559 559 case Opt_nocheck: 560 + ext2_msg(sb, KERN_WARNING, 561 + "Option nocheck/check=none is deprecated and" 562 + " will be removed in June 2020."); 560 563 clear_opt (opts->s_mount_opt, CHECK); 561 564 break; 562 565 case Opt_debug: ··· 1338 1335 new_opts.s_resgid = sbi->s_resgid; 1339 1336 spin_unlock(&sbi->s_lock); 1340 1337 1341 - /* 1342 - * Allow the "check" option to be passed as a remount option. 1343 - */ 1344 1338 if (!parse_options(data, sb, &new_opts)) 1345 1339 return -EINVAL; 1346 1340