Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:runcate_setsize - update inode and pagecache for a new file size*@inode: inode*@newsize: new file size* truncate_setsize updates i_size and performs pagecache truncation (if* necessary) to @newsize. It will be typically be called from the filesystem's

Proto:void truncate_setsize(struct inode *inode, loff_t newsize)

Type:void

Parameter:

TypeParameterName
struct inode *inode
loff_tnewsize
837  oldsize = i_size
839  NOTE: unlike i_size_read(), i_size_write() does need locking around it* (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount* can be lost, resulting in subsequent i_size_read() calls spinning forever.
840  If newsize > oldsize Then pagecache_isize_extended - update pagecache after extension of i_size*@inode: inode for which i_size was extended*@from: original inode size*@to: new inode size* Handle extension of inode size either caused by extending truncate or by
842  runcate_pagecache - unmap and remove pagecache that has been truncated*@inode: inode*@newsize: new file size* inode's new i_size must already be written before truncate_pagecache* is called.* This function should typically be called before the filesystem
Caller
NameDescribe
put_aio_ring_file
ramfs_nommu_resize