reiserfs: Fix quota mount option parsing
authorJan Kara <jack@suse.cz>
Wed, 21 Dec 2011 16:35:34 +0000 (17:35 +0100)
committerJan Kara <jack@suse.cz>
Mon, 9 Jan 2012 12:52:09 +0000 (13:52 +0100)
When jqfmt mount option is not specified on remount, we mistakenly clear
s_jquota_fmt value stored in superblock. Fix the problem.

CC: stable@kernel.org
CC: reiserfs-devel@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
fs/reiserfs/super.c

index 14363b96b6afafa74a80c2c66553c8d914064268..f9eaa4a4f5f319f4b0e7a6b398183a5b2060a959 100644 (file)
@@ -1164,7 +1164,8 @@ static void handle_quota_files(struct super_block *s, char **qf_names,
                        kfree(REISERFS_SB(s)->s_qf_names[i]);
                REISERFS_SB(s)->s_qf_names[i] = qf_names[i];
        }
-       REISERFS_SB(s)->s_jquota_fmt = *qfmt;
+       if (*qfmt)
+               REISERFS_SB(s)->s_jquota_fmt = *qfmt;
 }
 #endif