add patch fix-potential-use-after-free-in-ext4_journal-stop
[ext4-patch-queue.git] / promote-ext4-over-ext2-in-the-default-probe-order
blob29fea608986b6b605f86929efa79a4f7b4086d24
1 ext4: promote ext4 over ext2 in the default probe order
3 From: "Darrick J. Wong" <darrick.wong@oracle.com>
5 Prevent clean ext3 filesystems from mounting by default with the ext2
6 driver (with no journal!) by putting ext4 ahead of ext2 in the default
7 probe order.  This will have the effect of mounting ext2 filesystems
8 with ext4.ko by default, which is a safer failure than hoping the user
9 notices that their journalled ext3 is now running without a journal!
11 Users who require ext2.ko for ext2 can either disable ext4.ko or
12 explicitly request ext2 via "mount -t ext2" or "rootfstype=ext2".
14 Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
15 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 ---
17  fs/Makefile |    7 ++++---
18  1 file changed, 4 insertions(+), 3 deletions(-)
21 diff --git a/fs/Makefile b/fs/Makefile
22 index f79cf40..79f5225 100644
23 --- a/fs/Makefile
24 +++ b/fs/Makefile
25 @@ -63,10 +63,11 @@ obj-$(CONFIG_DLM)           += dlm/
26  # Do not add any filesystems before this line
27  obj-$(CONFIG_FSCACHE)          += fscache/
28  obj-$(CONFIG_REISERFS_FS)      += reiserfs/
29 -obj-$(CONFIG_EXT2_FS)          += ext2/
30 -# We place ext4 after ext2 so plain ext2 root fs's are mounted using ext2
31 -# unless explicitly requested by rootfstype
32  obj-$(CONFIG_EXT4_FS)          += ext4/
33 +# We place ext4 before ext2 so that clean ext3 root fs's do NOT mount using the
34 +# ext2 driver, which doesn't know about journalling!  Explicitly request ext2
35 +# by giving the rootfstype= parameter.
36 +obj-$(CONFIG_EXT2_FS)          += ext2/
37  obj-$(CONFIG_JBD2)             += jbd2/
38  obj-$(CONFIG_CRAMFS)           += cramfs/
39  obj-$(CONFIG_SQUASHFS)         += squashfs/
42 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
43 the body of a message to majordomo@vger.kernel.org
44 More majordomo info at  http://vger.kernel.org/majordomo-info.html