Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mntns_install

Proto:static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)

Type:int

Parameter:

TypeParameterName
struct nsproxy *nsproxy
struct ns_common *ns
3960  fs = fs
3961  mnt_ns = to_mnt_ns(ns)
3965  If Not ns_capable(user_ns, Allow setting zone reclaim policy ) || Not ns_capable(current_user_ns(), Allow use of chroot() ) || Not ns_capable(current_user_ns(), Allow setting zone reclaim policy ) Then Return -EPERM
3970  If is_anon_ns(mnt_ns) Then Return -EINVAL
3973  If users != 1 Then Return -EINVAL
3976  get_mnt_ns(mnt_ns)
3977  old_mnt_ns = mnt_ns
3978  mnt_ns = mnt_ns
3981  err = vfs_path_lookup - lookup a file path relative to a dentry-vfsmount pair*@dentry: pointer to dentry of the base directory*@mnt: pointer to vfs mount of the base directory*@name: pointer to file name*@flags: lookup flags*@path: pointer to struct path to fill
3983  If err Then
3985  mnt_ns = old_mnt_ns
3986  put_mnt_ns(mnt_ns)
3987  Return err
3990  put_mnt_ns(old_mnt_ns)
3993  Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.* It can block.
3994  Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.* It can block.
3996  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
3997  Return 0