函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int inode_newsize_ok(const struct inode *inode, loff_t offset)

返回类型:int

参数:

类型参数名称
const struct inode *inode
loff_toffset
137  如果i_size小于offset
140  limit等于rlimit(RLIMIT_FSIZE)
141  如果limit不等于RLIM_INFINITYoffset大于limit则转到:out_sig
143  如果offset大于s_maxbytes则转到:out_big
145  否则
151  如果IS_SWAPFILE(inode)则返回:负ETXTBSY
155  返回:0
156  out_sig :
157  send_sig(SIGXFSZ, 当前进程, 0)
158  out_big :
159  返回:负EFBIG
调用者
名称描述
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