From: Theodore Ts'o Date: Mon, 7 Nov 2011 15:47:42 +0000 (-0500) Subject: ext4: ignore journalled data options on remount if fs has no journal X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eb513689c97e3e73bb9b4459d490a8e894b4a546;p=mv-sheeva.git ext4: ignore journalled data options on remount if fs has no journal This avoids a confusing failure in the init scripts when the /etc/fstab has data=writeback or data=journal but the file system does not have a journal. So check for this case explicitly, and warn the user that we are ignoring the (pointless, since they have no journal) data=* mount option. Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 9953d80145a..0435013dbd4 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1683,7 +1683,9 @@ static int parse_options(char *options, struct super_block *sb, data_opt = EXT4_MOUNT_WRITEBACK_DATA; datacheck: if (is_remount) { - if (test_opt(sb, DATA_FLAGS) != data_opt) { + if (!sbi->s_journal) + ext4_msg(sb, KERN_WARNING, "Remounting file system with no journal so ignoring journalled data option"); + else if (test_opt(sb, DATA_FLAGS) != data_opt) { ext4_msg(sb, KERN_ERR, "Cannot change data mode on remount"); return 0;