Skip to content

Commit a2a513b

Browse files
author
Damien Le Moal
committed
zonefs: fix handling of explicit_open option on mount
Ignoring the explicit_open mount option on mount for devices that do not have a limit on the number of open zones must be done after the mount options are parsed and set in s_mount_opts. Move the check to ignore the explicit_open option after the call to zonefs_parse_options() in zonefs_fill_super(). Fixes: b5c00e9 ("zonefs: open/close zone on file open/close") Cc: <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]>
1 parent f2906aa commit a2a513b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/zonefs/super.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,12 +1760,6 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
17601760

17611761
atomic_set(&sbi->s_wro_seq_files, 0);
17621762
sbi->s_max_wro_seq_files = bdev_max_open_zones(sb->s_bdev);
1763-
if (!sbi->s_max_wro_seq_files &&
1764-
sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
1765-
zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
1766-
sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
1767-
}
1768-
17691763
atomic_set(&sbi->s_active_seq_files, 0);
17701764
sbi->s_max_active_seq_files = bdev_max_active_zones(sb->s_bdev);
17711765

@@ -1790,6 +1784,12 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent)
17901784
zonefs_info(sb, "Mounting %u zones",
17911785
blkdev_nr_zones(sb->s_bdev->bd_disk));
17921786

1787+
if (!sbi->s_max_wro_seq_files &&
1788+
sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
1789+
zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
1790+
sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
1791+
}
1792+
17931793
/* Create root directory inode */
17941794
ret = -ENOMEM;
17951795
inode = new_inode(sb);

0 commit comments

Comments
 (0)