[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190619123019.30032-11-mszeredi@redhat.com>
Date: Wed, 19 Jun 2019 14:30:17 +0200
From: Miklos Szeredi <mszeredi@...hat.com>
To: David Howells <dhowells@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, Ian Kent <raven@...maw.net>,
linux-api@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 11/13] cgroup: don't ignore options
The options "sync", "async", "dirsync", "lazytime", "nolazytime", "mand"
and "nomand" make no sense for the cgroup filesystem. If these options are
supplied to fsconfig(FSCONFIG_SET_FLAG), then return -EINVAL instead of
silently ignoring the option.
Any implementation, such as mount(8) that needs to parse this option
without failing should simply ignore the return value from fsconfig().
Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
---
kernel/cgroup/cgroup-v1.c | 2 +-
kernel/cgroup/cgroup.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index f960e6149311..1f50d59f7f4e 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -929,7 +929,7 @@ int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
struct fs_parse_result result;
int ret, opt, i;
- ret = vfs_parse_sb_flag(fc, param);
+ ret = vfs_parse_ro_rw(fc, param);
if (ret != -ENOPARAM)
return ret;
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 93890285b510..f2e86b3942b3 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1836,7 +1836,7 @@ static int cgroup2_parse_param(struct fs_context *fc, struct fs_parameter *param
struct fs_parse_result result;
int ret, opt;
- ret = vfs_parse_sb_flag(fc, param);
+ ret = vfs_parse_ro_rw(fc, param);
if (ret != -ENOPARAM)
return ret;
--
2.21.0
Powered by blists - more mailing lists