Skip to contentSkip to conversation

fix mount option parsing for ext3/4

PATCH New Josef Bacik 1 participant 1 message Mar 3, 2008 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix mount option parsing for ext3/4

Hello,

Noticed that the "resize" option won't be noticed as it comes after the NULL option, so if you try to mount (or in this case remount) with that option it won't be recognized. Both ext3 and ext4 have this problem. Thank you,

fs/ext3/super.c +1 -1
Index: linux-2.6/fs/ext3/super.c
===================================================================
@@ -806,8 +806,8 @@ static match_table_t tokens = {
 	{Opt_quota, "quota"},
 	{Opt_usrquota, "usrquota"},
 	{Opt_barrier, "barrier=%u"},
-	{Opt_err, NULL},
 	{Opt_resize, "resize"},
+	{Opt_err, NULL},
 };
 
 static ext3_fsblk_t get_sb_block(void **data)
fs/ext4/super.c +1 -1
Index: linux-2.6/fs/ext4/super.c
===================================================================
@@ -944,8 +944,8 @@ static match_table_t tokens = {
 	{Opt_mballoc, "mballoc"},
 	{Opt_nomballoc, "nomballoc"},
 	{Opt_stripe, "stripe=%u"},
-	{Opt_err, NULL},
 	{Opt_resize, "resize"},
+	{Opt_err, NULL},
 };
 
 static ext4_fsblk_t get_sb_block(void **data)