* [PATCH v2] ext4: bad mount opts in no journal mode
@ 2019-04-29 17:31 Debabrata Banerjee
2019-04-29 21:11 ` Jan Kara
2019-05-01 3:11 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Debabrata Banerjee @ 2019-04-29 17:31 UTC (permalink / raw)
To: Jan Kara, Theodore Ts'o, Andreas Dilger, linux-ext4,
Dmitry Monakhov, linux-kernel
Cc: dbanerje
Fixes:
commit 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
I assume was intended, all other options were blown away leading to
_ext4_show_options() output being incorrect.
Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 6ed4eb81e674..5cdf1d88b5c3 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4238,7 +4238,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
"data=, fs mounted w/o journal");
goto failed_mount_wq;
}
- sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM;
+ sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
clear_opt(sb, JOURNAL_CHECKSUM);
clear_opt(sb, DATA_FLAGS);
sbi->s_journal = NULL;
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext4: bad mount opts in no journal mode
2019-04-29 17:31 [PATCH v2] ext4: bad mount opts in no journal mode Debabrata Banerjee
@ 2019-04-29 21:11 ` Jan Kara
2019-05-01 3:11 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2019-04-29 21:11 UTC (permalink / raw)
To: Debabrata Banerjee
Cc: Jan Kara, Theodore Ts'o, Andreas Dilger, linux-ext4,
Dmitry Monakhov, linux-kernel
On Mon 29-04-19 13:31:58, Debabrata Banerjee wrote:
> Fixes:
> commit 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
>
> Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
> I assume was intended, all other options were blown away leading to
> _ext4_show_options() output being incorrect.
>
> Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Thanks! You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 6ed4eb81e674..5cdf1d88b5c3 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4238,7 +4238,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
> "data=, fs mounted w/o journal");
> goto failed_mount_wq;
> }
> - sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM;
> + sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
> clear_opt(sb, JOURNAL_CHECKSUM);
> clear_opt(sb, DATA_FLAGS);
> sbi->s_journal = NULL;
> --
> 2.21.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ext4: bad mount opts in no journal mode
2019-04-29 17:31 [PATCH v2] ext4: bad mount opts in no journal mode Debabrata Banerjee
2019-04-29 21:11 ` Jan Kara
@ 2019-05-01 3:11 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2019-05-01 3:11 UTC (permalink / raw)
To: Debabrata Banerjee
Cc: Jan Kara, Andreas Dilger, linux-ext4, Dmitry Monakhov, linux-kernel
On Mon, Apr 29, 2019 at 01:31:58PM -0400, Debabrata Banerjee wrote:
> Fixes:
> commit 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
>
> Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as
> I assume was intended, all other options were blown away leading to
> _ext4_show_options() output being incorrect.
>
> Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Thanks, applied. Note that the Fixes line should like this:
Fixes: 1e381f60dad9 ("ext4: do not allow journal_opts for fs w/o journal")
... and be placed along with the Signed-off-by: headers.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-01 3:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 17:31 [PATCH v2] ext4: bad mount opts in no journal mode Debabrata Banerjee
2019-04-29 21:11 ` Jan Kara
2019-05-01 3:11 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).