Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namespace.c Create Date:2022-07-28 20:09:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:add a mount into a namespace's mount tree

Proto:static int do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags)

Type:int

Parameter:

TypeParameterName
struct mount *newmnt
struct path *path
intmnt_flags
2706  mnt_flags &= ~MNT_INTERNAL_FLAGS
2708  mp = lock_mount(path)
2709  If IS_ERR(mp) Then Return PTR_ERR(mp)
2712  parent = real_mount(mnt)
2713  err = -EINVAL
2714  If Value for the false possibility is greater at compile time(!check_mnt(parent)) Then
2716  If Not (mnt_flags & MNT_SHRINKABLE) Then Go to unlock
2719  If Not containing namespace Then Go to unlock
2724  err = -EBUSY
2725  If mnt_sb == pointer to superblock && mnt_root == dentry Then Go to unlock
2729  err = -EINVAL
2730  If d_is_symlink( root of the mounted tree ) Then Go to unlock
2733  mnt_flags = mnt_flags
2734  err = graft_tree(newmnt, parent, mp)
2736  unlock :
2737  unlock_mount(mp)
2738  Return err
Caller
NameDescribe
do_new_mount_fcCreate a new mount using a superblock configuration and request it* be added to the namespace tree.
finish_automount