Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-28 08:58:57
Last Modify:2020-03-17 11:04:53 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Unshare the filesystem structure if it is being shared

Proto:static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)

Type:int

Parameter:

TypeParameterName
unsigned longunshare_flags
struct fs_struct **new_fsp
2853  fs = fs
2855  If Not (unshare_flags & set if fs info shared between processes ) || Not fs Then Return 0
2859  If users == 1 Then Return 0
2862  new_fsp = copy_fs_struct(fs)
2863  If Not new_fsp Then Return -ENOMEM
2866  Return 0
Caller
NameDescribe
ksys_unshareshare allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed