Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup1_reconfigure

Proto:int cgroup1_reconfigure(struct fs_context *fc)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
1043  ctx = cgroup_fc2context(fc)
1044  kf_root = kernfs_root_from_sb(d_sb)
1045  root = cgroup_root_from_kf(kf_root)
1046  ret = 0
1049  group_lock_and_drain_offline - lock cgroup_mutex and drain offlined csses*@cgrp: root of the target subtree* Because css offlining is asynchronous, userland may try to re-enable a* controller while the previous css is still around. This function grabs
1052  ret = check_cgroupfs_options(fc)
1053  If ret Then Go to out_unlock
1056  If Selected subsystems != The bitmask of subsystems attached to this hierarchy || Path for release notifications Then pr_warn("option changes via remount are deprecated (pid=%d comm=%s)\n", task_tgid_nr(current process), comm)
1060  added_mask = Selected subsystems & ~ The bitmask of subsystems attached to this hierarchy
1061  removed_mask = The bitmask of subsystems attached to this hierarchy & ~Selected subsystems
1064  If CGRP_ROOT_* flags ^ Hierarchy-specific flags || Hierarchy name && strcmp(Hierarchy name , The name for this hierarchy - may be empty ) Then
1066  cg_invalf(fc, "option or name mismatch, new: 0x%x \"%s\", old: 0x%x \"%s\"", CGRP_ROOT_* flags , Hierarchy name ? : "", Hierarchy-specific flags , The name for this hierarchy - may be empty )
1068  ret = -EINVAL
1069  Go to out_unlock
1073  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
1074  ret = -EBUSY
1075  Go to out_unlock
1078  ret = rebind_subsystems(root, added_mask)
1079  If ret Then Go to out_unlock
1082  WARN_ON(rebind_subsystems( & The default hierarchy, reserved for the subsystems that are otherwise* unattached - it never has more than a single cgroup, and all tasks are* part of that cgroup., removed_mask))
1084  If Path for release notifications Then
1085  spin_lock( & Protects cgroup_subsys->release_agent_path. Modifying it also requires* cgroup_mutex. Reading requires either cgroup_mutex or this spinlock.)
1086  strcpy( The path to use for release notifications. , Path for release notifications )
1087  spin_unlock( & Protects cgroup_subsys->release_agent_path. Modifying it also requires* cgroup_mutex. Reading requires either cgroup_mutex or this spinlock.)
1090  trace_cgroup_remount(root)
1092  out_unlock :
1093  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1094  Return ret