Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:setattr_copy - copy simple metadata updates into the generic inode*@inode: the inode to be updated*@attr: the new attributes* setattr_copy must be called with i_mutex held.* setattr_copy updates the inode's metadata with that specified* in attr

Proto:void setattr_copy(struct inode *inode, const struct iattr *attr)

Type:void

Parameter:

TypeParameterName
struct inode *inode
const struct iattr *attr
180  ia_valid = ia_valid
182  If ia_valid & ATTR_UID Then i_uid = ia_uid
184  If ia_valid & ATTR_GID Then i_gid = ia_gid
186  If ia_valid & ATTR_ATIME Then i_atime = ia_atime
188  If ia_valid & ATTR_MTIME Then i_mtime = ia_mtime
190  If ia_valid & ATTR_CTIME Then i_ctime = ia_ctime
192  If ia_valid & Attribute flags. These should be or-ed together to figure out what* has been changed! Then
193  mode = ia_mode
195  If Not Check whether we're fsgid/egid or in the supplemental group.. && Not apable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped*@inode: The inode in question*@cap: The capability in question* Return true if the current task has the given capability targeted at* its own user namespace and that the given inode's Then mode &= ~S_ISGID
198  i_mode = mode
Caller
NameDescribe
simple_setattrsimple_setattr - setattr for simple filesystem*@dentry: dentry*@iattr: iattr structure* Returns 0 on success, -error on failure
ramfs_nommu_setattrhandle a change of attributes* - we're specifically interested in a change of size