Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Initialise the cgroup filesystem creation/reconfiguration context. Notably,* we select the namespace we're going to use.

Proto:static int cgroup_init_fs_context(struct fs_context *fc)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
2120  ctx = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2121  If Not ctx Then Return -ENOMEM
2124  ns = cgroup_ns
2125  get_cgroup_ns(ns)
2126  fs_private = kfc
2127  If fs_type == cgroup2_fs_type Then ops = cgroup_fs_context_ops
2129  Else ops = cgroup1_fs_context_ops
2131  put_user_ns(user_ns)
2132  user_ns = get_user_ns(user_ns)
2133  global = true
2134  Return 0