Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:handle a change of attributes* - we're specifically interested in a change of size

Proto:static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
struct iattr *ia
163  inode = d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.
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  If ret Then Return ret
173  If ia_valid & ATTR_SIZE Then
174  size = i_size
176  If ia_size != size Then
178  If ret < 0 || ia_valid == ATTR_SIZE Then Go to out
180  Else
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  Return ret