函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\attr.c Create Date:2022-07-29 10:38:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:y_change - modify attributes of a filesytem object*@dentry: object affected*@attr: new attributes*@delegated_inode: returns inode, if the inode is delegated* The caller must hold the i_mutex on the affected object

函数原型:int notify_change(struct dentry *dentry, struct iattr *attr, struct inode **delegated_inode)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
struct iattr *attr
struct inode **delegated_inode
225  inode等于 Where the name belongs to - NULL is * negative
226  mode等于i_mode
229  ia_valid等于ia_valid
231  WARN_ON_ONCE(!inode_is_locked(inode))
233  如果ia_valid按位与Attribute flags. These should be or-ed together to figure out what* has been changed!按位或ATTR_UID按位或ATTR_GID按位或ATTR_TIMES_SET的值则
234  如果IS_IMMUTABLE(inode)或IS_APPEND(inode)则返回:负EPERM
242  如果ia_valid按位与ATTR_TOUCH
243  如果IS_IMMUTABLE(inode)则返回:负EPERM
248  如果error则返回:error
253  如果ia_valid按位与Attribute flags. These should be or-ed together to figure out what* has been changed!
254  amode等于ia_mode
256  如果is_sxid(amode)则i_flags与等于 suid or xattr security attributes 的反
260  now等于rrent_time - Return FS time*@inode: inode.* Return the current time truncated to the time granularity supported by* the fs.* Note that inode and inode->sb cannot be NULL.* Otherwise, the function warns and returns time without truncation.
262  ia_ctime等于now
263  如果非ia_valid按位与ATTR_ATIME_SET的值则ia_atime等于now
265  否则ia_atime等于mestamp_truncate - Truncate timespec to a granularity*@t: Timespec*@inode: inode being updated* Truncate a timespec to the granularity supported by the fs* containing the inode. Always rounds down. gran must
267  如果非ia_valid按位与ATTR_MTIME_SET的值则ia_mtime等于now
269  否则ia_mtime等于mestamp_truncate - Truncate timespec to a granularity*@t: Timespec*@inode: inode being updated* Truncate a timespec to the granularity supported by the fs* containing the inode. Always rounds down. gran must
272  如果ia_valid按位与ATTR_KILL_PRIV
273  error等于security_inode_need_killpriv(dentry)
274  如果error小于0则返回:error
276  如果error恒等于0则ia_valid等于ia_valid与等于ATTR_KILL_PRIV的反
287  如果ia_valid按位与ATTR_KILL_SUID按位或ATTR_KILL_SGID的值且ia_valid按位与Attribute flags. These should be or-ed together to figure out what* has been changed!BUG()
291  如果ia_valid按位与ATTR_KILL_SUID
292  如果mode按位与S_ISUID
294  ia_mode等于i_mode按位与S_ISUID的反
297  如果ia_valid按位与ATTR_KILL_SGID
298  如果mode按位与S_ISGID按位或S_IXGRP的值的值恒等于S_ISGID按位或S_IXGRP的值则
303  ia_mode与等于S_ISGID的反
306  如果非ia_valid按位与ATTR_KILL_SUID按位或ATTR_KILL_SGID的值的反的值则返回:0
313  如果ia_valid按位与ATTR_UID且非kuid_has_mapping(s_user_ns, ia_uid)则返回:负EOVERFLOW
316  如果ia_valid按位与ATTR_GID且非kgid_has_mapping(s_user_ns, ia_gid)则返回:负EOVERFLOW
323  如果非ia_valid按位与ATTR_UID的值且非uid_valid(i_uid)则返回:负EOVERFLOW
325  如果非ia_valid按位与ATTR_GID的值且非gid_valid(i_gid)则返回:负EOVERFLOW
328  error等于security_inode_setattr(dentry, attr)
329  如果error则返回:error
331  error等于try_break_deleg(inode, delegated_inode)
332  如果error则返回:error
335  如果setattrerror等于setattr(dentry, attr)
337  否则error等于simple_setattr - setattr for simple filesystem*@dentry: dentry*@iattr: iattr structure* Returns 0 on success, -error on failure
340  如果非error
341  snotify_change - notify_change event. file was modified and/or metadata* was changed.
342  ima_inode_post_setattr(dentry)
343  evm_inode_post_setattr(dentry, ia_valid)
346  返回:error
调用者
名称描述
chmod_common
chown_common
__remove_privs
utimes_common