函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namespace.c Create Date:2022-07-29 10:39:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_move_mount

函数原型:static int do_move_mount(struct path *old_path, struct path *new_path)

返回类型:int

参数:

类型参数名称
struct path *old_path
struct path *new_path
2608  mp等于lock_mount(new_path)
2609  如果是错误则返回:错误
2612  old等于real_mount(mnt)
2613  p等于real_mount(mnt)
2614  parent等于mnt_parent
2615  attached等于mnt_has_parent(old)
2616  old_mp等于 where is it mounted
2617  ns等于 containing namespace
2619  err等于负EINVAL
2621  如果非check_mnt(p)则转到:out
2625  如果非is_mounted( & mnt)则转到:out
2629  如果非如果attachedcheck_mnt(old)否则is_anon_ns(ns)则转到:out
2632  如果mnt_flags按位与MNT_LOCKED则转到:out
2635  如果dentry不等于mnt_root则转到:out
2638  如果d_is_dir(dentry)不等于d_is_dir(dentry)则转到:out
2644  如果attachedIS_MNT_SHARED(parent)则转到:out
2650  如果IS_MNT_SHARED(p)且tree_contains_unbindable(old)则转到:out
2652  err等于负ELOOP
2653  如果非Check that there aren't references to earlier/same mount namespaces in the* specified subtree. Such references can act as pins for mount namespaces* that aren't checked by the mount-cycle checking code, thereby allowing* cycles to be made.则转到:out
2655 mnt_has_parent(p)循环如果p恒等于old
2657  转到:out
2659  err等于@source_mnt : mount tree to be attached*@nd : place the mount tree @source_mnt is attached*@parent_nd : if non-null, detach the source_mnt from its parent and* store the parent mount and mountpoint dentry
2661  如果err则转到:out
2666  删除链表项并重新初始化
2667  如果attachedalled with namespace_lock and vfsmount lock
2669  out :
2670  unlock_mount(mp)
2671  如果非err
2672  如果attachedmntput_no_expire(parent)
2674  否则free_mnt_ns(ns)
2677  返回:err
调用者
名称描述
do_move_mount_old
SYSCALL_DEFINE5Move a mount from one place to another. In combination with* fsopen()/fsmount() this is used to install a new mount and in combination* with open_tree(OPEN_TREE_CLONE [| AT_RECURSIVE]) it can be used to copy* a mount subtree.