函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:unshare_fs_struct

函数原型:int unshare_fs_struct(void)

返回类型:int

参数:

135  fs等于fs
136  new_fs等于copy_fs_struct(fs)
139  如果非new_fs则返回:负ENOMEM
142  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
143  加自旋锁
144  kill等于非users先自减
145  fs等于new_fs
146  自旋锁解锁
147  task_unlock(当前进程)
149  如果killfree_fs_struct(fs)
152  返回:0