函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mntns_install

函数原型:static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)

返回类型:int

参数:

类型参数名称
struct nsproxy *nsproxy
struct ns_common *ns
3960  fs等于fs
3961  mnt_ns等于to_mnt_ns(ns)
3965  如果非ns_capable(user_ns, Allow setting zone reclaim policy )或非ns_capable(current_user_ns(), Allow use of chroot() )或非ns_capable(current_user_ns(), Allow setting zone reclaim policy )则返回:负EPERM
3970  如果is_anon_ns(mnt_ns)则返回:负EINVAL
3973  如果users不等于1则返回:负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  如果err
3985  mnt_ns等于old_mnt_ns
3986  put_mnt_ns(mnt_ns)
3987  返回: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  返回:0