函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fsopen.c Create Date:2022-07-29 10:44:26
Last Modify:2022-05-24 07:35:12 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Open a filesystem by name so that it can be configured for mounting.* We are allowed to specify a container in which the filesystem will be* opened, thereby indicating which namespaces will be used (notably, which

函数原型:SYSCALL_DEFINE2(fsopen, const char __user *, _fs_name, unsigned int, flags)

返回类型:

参数:

122  如果非ns_capable(user_ns, Allow setting zone reclaim policy )则返回:负EPERM
125  如果flags按位与sopen() flags.的反则返回:负EINVAL
128  fs_name等于strndup_user - duplicate an existing string from user space*@s: The string to duplicate*@n: Maximum number of bytes to copy, including the trailing NUL.* Return: newly allocated copy of @s or an ERR_PTR() in case of error
129  如果是错误则返回:错误
132  fs_type等于get_fs_type(fs_name)
133  释放内存
134  如果非fs_type则返回:负ENODEV
137  fc等于fs_context_for_mount(fs_type, 0)
138  put_filesystem(fs_type)
139  如果是错误则返回:错误
142  phase等于FS_CONTEXT_CREATE_PARAMS
144  ret等于fscontext_alloc_log(fc)
145  如果ret小于0则转到:err_fc
148  返回:Attach a filesystem context to a file and an fd.
150  err_fc :
151  put_fs_context - Dispose of a superblock configuration context.*@fc: The context to dispose of.
152  返回:ret