Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fs_struct.c Create Date:2022-07-28 20:12:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:unshare_fs_struct

Proto:int unshare_fs_struct(void)

Type:int

Parameter:Nothing

135  fs = fs
136  new_fs = copy_fs_struct(fs)
139  If Not new_fs Then Return -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  spin_lock( & lock)
144  kill = Not --users
145  fs = new_fs
146  spin_unlock( & lock)
147  task_unlock(current process)
149  If kill Then free_fs_struct(fs)
152  Return 0