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:de_newsize_ok - may this inode be truncated to a given size*@inode: the inode to be truncated*@offset: the new size to assign to the inode* inode_newsize_ok must be called with i_mutex held

Proto:int inode_newsize_ok(const struct inode *inode, loff_t offset)

Type:int

Parameter:

TypeParameterName
const struct inode *inode
loff_toffset
137  If i_size < offset Then
140  limit = rlimit(RLIMIT_FSIZE)
141  If limit != RLIM_INFINITY && offset > limit Then Go to out_sig
143  If offset > s_maxbytes Then Go to out_big
145  Else
151  If IS_SWAPFILE(inode) Then Return -ETXTBSY
155  Return 0
156  out_sig :
157  send_sig(SIGXFSZ, current process, 0)
158  out_big :
159  Return -EFBIG
Caller
NameDescribe
setattr_preparesetattr_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
generic_cont_expand_simplelity function for filesystems that need to do work on expanding* truncates. Uses filesystem pagecache writes to allow the filesystem to* deal with the hole.
ramfs_nommu_expand_for_mappingadd a contiguous set of pages into a ramfs inode when it's truncated from* size 0 on the assumption that it's going to be used for an mmap of shared* memory