函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:handle a change of attributes* - we're specifically interested in a change of size

函数原型:static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
struct iattr *ia
163  inode等于获得目录项的索引节点
164  old_ia_valid等于ia_valid
165  ret等于0
168  ret等于setattr_prepare - check if attribute changes to a dentry are allowed*@dentry: dentry to check*@attr: attributes to change* Check if we are allowed to change the attributes contained in @attr* in the given dentry
169  如果ret则返回:ret
173  如果ia_valid按位与ATTR_SIZE
174  size等于i_size
176  如果ia_size不等于size
178  如果ret小于0或ia_valid恒等于ATTR_SIZE则转到:out
180  否则
184  ia_valid或等于ATTR_MTIME按位或ATTR_CTIME
188  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
189  out :
190  ia_valid等于old_ia_valid
191  返回:ret