函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup-v1.c Create Date:2022-07-27 12:15:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:group_rename - Only allow simple rename of directories in place.

函数原型:static int cgroup1_rename(struct kernfs_node *kn, struct kernfs_node *new_parent, const char *new_name_str)

返回类型:int

参数:

类型参数名称
struct kernfs_node *kn
struct kernfs_node *new_parent
const char *new_name_str
821  cgrp等于priv
824  如果kernfs_type(kn)不等于KERNFS_DIR则返回:负ENOTDIR
826  如果* Use kernfs_get_parent() and kernfs_name/path() instead of * accessing the following two fields directly. If the node is * never moved to a different parent, it is safe to access the * parent directly.不等于new_parent则返回:负EIO
834  kernfs_break_active_protection(new_parent)
835  kernfs_break_active_protection(kn)
837  mutex_lock( & cgroup_mutex is the master lock)
839  ret等于kernfs_rename(kn, new_parent, new_name_str)
840  如果非retcgroup_path() takes a spin lock(rename, cgrp)
843  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.
845  kernfs_unbreak_active_protection(kn)
846  kernfs_unbreak_active_protection(new_parent)
847  返回:ret