| Function report | 
| Source Code: fs\namespace.c | Create Date:2022-07-28 20:09:20 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:copy_mnt_ns
Proto:struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns, struct user_namespace *user_ns, struct fs_struct *new_fs)
Type:struct mnt_namespace
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| unsigned long | flags | |
| struct mnt_namespace * | ns | |
| struct user_namespace * | user_ns | |
| struct fs_struct * | new_fs | 
| 3224 | If Value is more likely to compile time(!(flags & New mount namespace group )) Then | 
| 3225 | get_mnt_ns(ns) | 
| 3226 | Return ns | 
| 3231 | new_ns = alloc_mnt_ns(user_ns, false) | 
| 3235 | namespace_lock() | 
| 3237 | copy_flags = CL_COPY_UNBINDABLE | CL_EXPIRE | 
| 3238 | If user_ns != user_ns Then copy_flags |= CL_SHARED_TO_SLAVE | 
| 3240 | new = copy_tree(old, root of the mounted tree , copy_flags) | 
| 3242 | namespace_unlock() | 
| 3243 | free_mnt_ns(new_ns) | 
| 3262 | containing namespace = new_ns | 
| 3263 | # of mounts in the namespace ++ | 
| 3264 | If new_fs Then | 
| 3276 | If Not q Then Break | 
| 3278 | When root of the mounted tree != root of the mounted tree cycle | 
| 3281 | namespace_unlock() | 
| 3288 | Return new_ns | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |