[Devel] [PATCH RH8] ve/fs/nfs: NFS containerization - remove excess current_user_ns_initial

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Fri Aug 27 13:08:10 MSK 2021


Now when we use FS_VE_MOUNT for nfs instead of FS_USERNS_MOUNT we
already have a check that nfs can be mounted only from initial userns.

https://jira.sw.ru/browse/PSBM-131949
Fixes: f1c852869b95 ("ve/fs/nfs: NFS containerization")
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 fs/nfs/fs_context.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index 9eed176870ee..68efb1e9b143 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -1364,8 +1364,6 @@ static int nfs_init_fs_context(struct fs_context *fc)
 
 	if (!(get_exec_env()->features & VE_FEATURE_NFS))
 		return -ENODEV;
-	if (!current_user_ns_initial())
-		return -EPERM;
 
 	ctx = kzalloc(sizeof(struct nfs_fs_context), GFP_KERNEL);
 	if (unlikely(!ctx))
-- 
2.31.1



More information about the Devel mailing list