[Devel] [PATCH RH7 01/14] mount: rename do_set_group to do_set_group_old

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Apr 13 13:47:11 MSK 2023


We have a VZ-only feature to copy mount sharing between mounts via mount
syscall, to be able to handle mount restore in CRIU u15-u19 efficiently.

In mainstream there is now similar feature through move_mount syscall.

To support both old criu and new criu, which uses ms API, at the same
time let's fix name collision and leave both variants for now, several
updates later we can drop old mount syscall based API.

https://jira.sw.ru/browse/PSBM-144416
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 fs/namespace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index fcfe15ed28f2..94f1e308b354 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2939,7 +2939,7 @@ static inline int tree_contains_unbindable(struct mount *mnt)
 	return 0;
 }
 
-static int do_set_group(struct path *path, const char *sibling_name)
+static int do_set_group_old(struct path *path, const char *sibling_name)
 {
 	struct ve_struct *ve = get_exec_env();
 	struct mount *sibling, *mnt;
@@ -3525,7 +3525,7 @@ long do_mount(const char *dev_name, const char __user *dir_name,
 	else if (cmd & MS_MOVE)
 		retval = do_move_mount_old(&path, dev_name);
 	else if (cmd & MS_SET_GROUP)
-		retval = do_set_group(&path, dev_name);
+		retval = do_set_group_old(&path, dev_name);
 	else
 		retval = do_new_mount(&path, type_page, flags, mnt_flags,
 				      dev_name, data_page);
-- 
2.39.2



More information about the Devel mailing list