函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:reate a new mount for userspace and request it to be added into the* namespace's tree

函数原型:static int do_new_mount(struct path *path, const char *fstype, int sb_flags, int mnt_flags, const char *name, void *data)

返回类型:int

参数:

类型参数名称
struct path *path
const char *fstype
intsb_flags
intmnt_flags
const char *name
void *data
2786  const char * subtype = NULL
2787  err等于0
2789  如果非fstype则返回:负EINVAL
2792  type等于get_fs_type(fstype)
2793  如果非type则返回:负ENODEV
2796  如果fs_flags按位与FS_HAS_SUBTYPE
2797  subtype等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for
2798  如果subtype
2799  subtype自加
2800  如果非subtype
2802  返回:负EINVAL
2807  fc等于s_context manipulation functions.
2808  put_filesystem(type)
2809  如果是错误则返回:错误
2812  如果subtypeerr等于vfs_parse_fs_string(fc, "subtype", subtype, strlen - Find the length of a string*@s: The string to be sized)
2815  如果非errnameerr等于vfs_parse_fs_string(fc, "source", name, strlen - Find the length of a string*@s: The string to be sized)
2817  如果非errerr等于parse_monolithic_mount_data(fc, data)
2819  如果非err且非mount_capable(fc)则err等于负EPERM
2821  如果非errerr等于vfs_get_tree - Get the mountable root*@fc: The superblock configuration context.* The filesystem is invoked to get or create a superblock which can then later* be used for mounting. The filesystem places a pointer to the root to be
2823  如果非errerr等于Create a new mount using a superblock configuration and request it* be added to the namespace tree.
2826  put_fs_context - Dispose of a superblock configuration context.*@fc: The context to dispose of.
2827  返回:err
调用者
名称描述
do_mountFlags is a 32-bit value that allows up to 31 non-fs dependent flags to* be given to the mount() call (ie: read-only, no-dev, no-suid etc)