From b1d63b06e8398eb048dcc455acc628e6655d7499 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 28 Jun 2024 18:10:47 -0400 Subject: bcachefs: Make read_only a mount option again, but hidden fsck passes read_only as a mount option, and it's required for nochanges, which it also uses. Usually read_only is handled by the VFS, but we need to be able to handle it too; we just don't want to print it out twice, so mark it as a hidden option. Signed-off-by: Kent Overstreet --- fs/bcachefs/chardev.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'fs/bcachefs/chardev.c') diff --git a/fs/bcachefs/chardev.c b/fs/bcachefs/chardev.c index 72ade3664d7b..ef1f74866e23 100644 --- a/fs/bcachefs/chardev.c +++ b/fs/bcachefs/chardev.c @@ -214,19 +214,6 @@ static long bch2_ioctl_fsck_offline(struct bch_ioctl_fsck_offline __user *user_a if (arg.opts) { char *optstr = strndup_user((char __user *)(unsigned long) arg.opts, 1 << 16); - char *ro, *rest; - - /* - * If passed a "read_only" mount option, remove it because it is - * no longer a valid mount option, and the filesystem will be - * set "read_only" regardless. - */ - ro = strstr(optstr, "read_only"); - if (ro) { - rest = ro + strlen("read_only"); - memmove(ro, rest, strlen(rest) + 1); - } - ret = PTR_ERR_OR_ZERO(optstr) ?: bch2_parse_mount_opts(NULL, &thr->opts, NULL, optstr); if (!IS_ERR(optstr)) -- cgit v1.2.3