From: Darrick J. Wong Date: Thu, 15 Oct 2015 14:33:21 +0000 (-0400) Subject: ext4: promote ext4 over ext2 in the default probe order X-Git-Tag: firefly_0821_release~176^2~594^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9172796bc3754af73b90cbd70586812ddbc1e0ca;p=firefly-linux-kernel-4.4.55.git ext4: promote ext4 over ext2 in the default probe order Prevent clean ext3 filesystems from mounting by default with the ext2 driver (with no journal!) by putting ext4 ahead of ext2 in the default probe order. This will have the effect of mounting ext2 filesystems with ext4.ko by default, which is a safer failure than hoping the user notices that their journalled ext3 is now running without a journal! Users who require ext2.ko for ext2 can either disable ext4.ko or explicitly request ext2 via "mount -t ext2" or "rootfstype=ext2". Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o --- diff --git a/fs/Makefile b/fs/Makefile index f79cf4043e60..79f522575cba 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -63,10 +63,11 @@ obj-$(CONFIG_DLM) += dlm/ # Do not add any filesystems before this line obj-$(CONFIG_FSCACHE) += fscache/ obj-$(CONFIG_REISERFS_FS) += reiserfs/ -obj-$(CONFIG_EXT2_FS) += ext2/ -# We place ext4 after ext2 so plain ext2 root fs's are mounted using ext2 -# unless explicitly requested by rootfstype obj-$(CONFIG_EXT4_FS) += ext4/ +# We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the +# ext2 driver, which doesn't know about journalling! Explicitly request ext2 +# by giving the rootfstype= parameter. +obj-$(CONFIG_EXT2_FS) += ext2/ obj-$(CONFIG_JBD2) += jbd2/ obj-$(CONFIG_CRAMFS) += cramfs/ obj-$(CONFIG_SQUASHFS) += squashfs/