函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_fs_context - Create a filesystem context.*@fs_type: The filesystem type.*@reference: The dentry from which this one derives (or NULL)*@sb_flags: Filesystem/superblock flags (SB_*)*@sb_flags_mask: Applicable members of @sb_flags

函数原型:static struct fs_context *alloc_fs_context(struct file_system_type *fs_type, struct dentry *reference, unsigned int sb_flags, unsigned int sb_flags_mask, enum fs_context_purpose purpose)

返回类型:struct fs_context

参数:

类型参数名称
struct file_system_type *fs_type
struct dentry *reference
unsigned intsb_flags
unsigned intsb_flags_mask
enum fs_context_purposepurpose
259  ret等于负ENOMEM
261  fc等于分配内存并置零
262  如果非fc则返回:错误号
265  purpose等于purpose
266  sb_flags等于sb_flags
267  sb_flags_mask等于sb_flags_mask
268  fs_type等于WARNING: This can be used only if we _already_ own a reference
269  cred等于get_current_cred - Get the current task's subjective credentials* Get the subjective credentials of the current task, pinning them so that* they can't go away. Accessing the current task's credentials directly is* not permitted.()
270  net_ns等于get_net(net_ns)
272  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & uapi_mutex)
275  :purpose恒等于 New superblock for explicit mount
276  user_ns等于get_user_ns(user_ns)
277  退出
278  :purpose恒等于 New superblock for automatic submount
279  user_ns等于get_user_ns(s_user_ns)
280  退出
281  :purpose恒等于 Superblock reconfiguration (remount)
282  atomic_inc( & s_active)
283  user_ns等于get_user_ns(s_user_ns)
284  root等于获得目录项引用
285  退出
289  init_fs_context等于init_fs_context
290  如果非init_fs_contextinit_fs_context等于legacy_init_fs_context
293  ret等于init_fs_context(fc)
294  如果ret小于0则转到:err_fc
296  need_free = true
297  返回:fc
299  err_fc :
300  put_fs_context - Dispose of a superblock configuration context.*@fc: The context to dispose of.
301  返回:错误号
调用者
名称描述
fs_context_for_mount
fs_context_for_reconfigure
fs_context_for_submount