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:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cgroup1_get_tree

Proto:int cgroup1_get_tree(struct fs_context *fc)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
1204  ctx = cgroup_fc2context(fc)
1208  If Not ns_capable(user_ns, Allow setting zone reclaim policy ) Then Return -EPERM
1211  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
1213  ret = The guts of cgroup1 mount - find or create cgroup_root to use
1214  If Not ret && Not percpu_ref_tryget_live - try to increment a live percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless it has already been killed Then ret = 1
1217  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.
1219  If Not ret Then ret = cgroup_do_get_tree(fc)
1222  If Not ret && percpu_ref_is_dying - test whether a percpu refcount is dying or dead*@ref: percpu_ref to test* Returns %true if @ref is dying or dead.* This function is safe to call as long as @ref is between init and exit Then
1223  sb = d_sb
1224  dput(root)
1225  deactivate_locked_super - drop an active reference to superblock*@s: superblock to deactivate* Drops an active reference to superblock, converting it into a temporary* one if there is no other active references left
1226  ret = 1
1229  If Value for the false possibility is greater at compile time(ret > 0) Then
1230  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
1231  Return restart_syscall()
1233  Return ret