函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:clone_mnt

函数原型:static struct mount *clone_mnt(struct mount *old, struct dentry *root, int flag)

返回类型:struct mount

参数:

类型参数名称
struct mount *old
struct dentry *root
intflag
1019  sb等于 pointer to superblock
1023  mnt等于alloc_vfsmnt( Name of device e.g. /dev/dsk/hda1 )
1024  如果非mnt则返回:错误号
1027  如果flag按位与CL_SLAVE按位或CL_PRIVATE按位或CL_SHARED_TO_SLAVE的值则 peer group identifier 等于0
1029  否则 peer group identifier 等于 peer group identifier
1032  如果flag按位与CL_MAKE_SHARED且非 peer group identifier
1033  err等于Allocate a new peer group ID
1034  如果err则转到:out_free
1038  mnt_flags等于mnt_flags
1039  mnt_flags与等于MNT_WRITE_HOLD按位或MNT_MARKED按位或MNT_INTERNAL的值的反
1041  atomic_inc( & s_active)
1042  pointer to superblock 等于sb
1043  root of the mounted tree 等于获得目录项引用
1044  mnt_mountpoint等于 root of the mounted tree
1045  mnt_parent等于mnt
1046  lock_mount_hash()
1047  添加链表项
1048  unlock_mount_hash()
1050  如果flag按位与CL_SLAVEflag按位与CL_SHARED_TO_SLAVEIS_MNT_SHARED(old)则
1052  添加链表项
1053  slave is on master->mnt_slave_list 等于old
1054  CLEAR_MNT_SHARED(mnt)
1055  否则如果非flag按位与CL_PRIVATE的值则
1056  如果flag按位与CL_MAKE_SHAREDIS_MNT_SHARED(old)则添加链表项
1058  如果IS_MNT_SLAVE(old)则添加链表项
1060  slave is on master->mnt_slave_list 等于 slave is on master->mnt_slave_list
1061  否则
1062  CLEAR_MNT_SHARED(mnt)
1064  如果flag按位与CL_MAKE_SHAREDset_mnt_shared(mnt)
1069  如果flag按位与CL_EXPIRE
1070  如果非链表为空添加链表项
1074  返回:mnt
1076  out_free :
1077  mnt_free_id(mnt)
1078  free_vfsmnt(mnt)
1079  返回:错误号
调用者
名称描述
mnt_clone_internal
copy_tree
clone_private_mountlone_private_mount - create a private clone of a path* This creates a new vfsmount, which will be the clone of @path. The new will* not be attached anywhere in the namespace and will be private (i.e. changes
__do_loopback