]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.17-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jun 2022 09:46:57 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jun 2022 09:46:57 +0000 (11:46 +0200)
added patches:
zonefs-fix-handling-of-explicit_open-option-on-mount.patch

queue-5.17/series
queue-5.17/zonefs-fix-handling-of-explicit_open-option-on-mount.patch [new file with mode: 0644]

index 375daeba01ba370fdde2739d049178ae5846f966..f5200672a200ab3ceabc15f25eaa05b4bb83bacc 100644 (file)
@@ -295,3 +295,4 @@ md-raid0-ignore-raid0-layout-if-the-second-zone-has-only-one-device.patch
 net-sched-act_police-more-accurate-mtu-policing.patch
 block-loop-support-partitions-without-scanning.patch
 pci-qcom-fix-pipe-clock-imbalance.patch
+zonefs-fix-handling-of-explicit_open-option-on-mount.patch
diff --git a/queue-5.17/zonefs-fix-handling-of-explicit_open-option-on-mount.patch b/queue-5.17/zonefs-fix-handling-of-explicit_open-option-on-mount.patch
new file mode 100644 (file)
index 0000000..463e9e7
--- /dev/null
@@ -0,0 +1,52 @@
+From a2a513be7139b279f1b5b2cee59c6c4950c34346 Mon Sep 17 00:00:00 2001
+From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
+Date: Thu, 2 Jun 2022 23:16:57 +0900
+Subject: zonefs: fix handling of explicit_open option on mount
+
+From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
+
+commit a2a513be7139b279f1b5b2cee59c6c4950c34346 upstream.
+
+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: b5c00e975779 ("zonefs: open/close zone on file open/close")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/zonefs/super.c |   11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/fs/zonefs/super.c
++++ b/fs/zonefs/super.c
+@@ -1694,11 +1694,6 @@ static int zonefs_fill_super(struct supe
+       sbi->s_mount_opts = ZONEFS_MNTOPT_ERRORS_RO;
+       sbi->s_max_open_zones = bdev_max_open_zones(sb->s_bdev);
+       atomic_set(&sbi->s_open_zones, 0);
+-      if (!sbi->s_max_open_zones &&
+-          sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
+-              zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
+-              sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
+-      }
+       ret = zonefs_read_super(sb);
+       if (ret)
+@@ -1717,6 +1712,12 @@ static int zonefs_fill_super(struct supe
+       zonefs_info(sb, "Mounting %u zones",
+                   blkdev_nr_zones(sb->s_bdev->bd_disk));
++      if (!sbi->s_max_open_zones &&
++          sbi->s_mount_opts & ZONEFS_MNTOPT_EXPLICIT_OPEN) {
++              zonefs_info(sb, "No open zones limit. Ignoring explicit_open mount option\n");
++              sbi->s_mount_opts &= ~ZONEFS_MNTOPT_EXPLICIT_OPEN;
++      }
++
+       /* Create root directory inode */
+       ret = -ENOMEM;
+       inode = new_inode(sb);