[Devel] [PATCH RHEL8 COMMIT] ve/fs: Allow to mount ext4 in top CT userns - cleanup
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Mar 19 13:44:17 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.8
------>
commit 8d7ddfec0ae071b5a573c5386b30238c9fea121b
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Thu Mar 18 18:06:19 2021 +0300
ve/fs: Allow to mount ext4 in top CT userns - cleanup
After commit d5c3320347bb ("fs/ve: add new FS_VE_MOUNT flag to allow mount
in container init userns") it's wise to use FS_VE_MOUNT flag
instead of generic FS_USERNS_MOUNT + additional per-fs check.
This patch does not change the behavior.
To_merge: 078ab00c9fe1 ("ve/fs: Allow to mount ext4 in top CT userns")
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
fs/ext4/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0c7afda8647a..d03b997b77b3 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6275,8 +6275,6 @@ static int ext4_get_next_id(struct super_block *sb, struct kqid *qid)
static struct dentry *ext4_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
- if (!current_user_ns_initial())
- return ERR_PTR(-EPERM);
return mount_bdev(fs_type, flags, dev_name, data, ext4_fill_super);
}
@@ -6353,7 +6351,7 @@ static struct file_system_type ext4_fs_type = {
.mount = ext4_mount,
.kill_sb = ext4_kill_sb,
.fs_flags = FS_REQUIRES_DEV | FS_VIRTUALIZED |
- FS_USERNS_MOUNT,
+ FS_VE_MOUNT,
};
MODULE_ALIAS_FS("ext4");
More information about the Devel
mailing list