diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-05-22 22:12:35 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-05-22 22:12:35 +0200 |
commit | 373cd5c53d5ea6622c319ecd84e29e2737d488bd (patch) | |
tree | 2df40a29def22438cc15f90e4683d43974798784 /fs/ext4 | |
parent | ext4: fix possible use-after-free in ext4_remove_li_request() (diff) | |
download | linux-373cd5c53d5ea6622c319ecd84e29e2737d488bd.tar.xz linux-373cd5c53d5ea6622c319ecd84e29e2737d488bd.zip |
ext4: don't show mount options in /proc/mounts if there is no journal
After creating an ext4 file system without a journal:
# mke2fs -t ext4 -O ^has_journal /dev/sda
# mount -t ext4 /dev/sda /test
the /proc/mounts will show:
"/dev/sda /test ext4 rw,relatime,user_xattr,acl,barrier=1,data=writeback 0 0"
which can fool users into thinking that the fs is using writeback mode.
So don't set the writeback option when the journal has not been
enabled; we don't depend on the writeback option being set, since
ext4_should_writeback_data() in ext4_jbd2.h tests to see if the
journal is not present before returning true.
Reported-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ed5e80ef48c4..fdce4eebce0c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3485,7 +3485,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) goto failed_mount_wq; } else { clear_opt(sb, DATA_FLAGS); - set_opt(sb, WRITEBACK_DATA); sbi->s_journal = NULL; needs_recovery = 0; goto no_journal; |