1TRUNCATE_SETSIZE(9)       Memory Management in Linux       TRUNCATE_SETSIZE(9)
2
3
4

NAME

6       truncate_setsize - update inode and pagecache for a new file size
7

SYNOPSIS

9       void truncate_setsize(struct inode * inode, loff_t newsize);
10

ARGUMENTS

12       inode
13           inode
14
15       newsize
16           new file size
17

DESCRIPTION

19       truncate_setsize updates i_size and performs pagecache truncation (if
20       necessary) to newsize. It will be typically be called from the
21       filesystem's setattr function when ATTR_SIZE is passed in.
22
23       Must be called with inode_mutex held and before all filesystem specific
24       block truncation has been performed.
25
27Kernel Hackers Manual 3.10         June 2019               TRUNCATE_SETSIZE(9)
Impressum