Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\nommu.c Create Date:2022-07-28 14:38:11
Last Modify:2020-03-17 21:26:27 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mmu_shrink_inode_mappings - Shrink the shared mappings on an inode*@inode: The inode to check*@size: The current filesize of the inode*@newsize: The proposed filesize of the inode* Check the shared mappings on an inode on behalf of a shrinking truncate

Proto:int nommu_shrink_inode_mappings(struct inode *inode, size_t size, size_t newsize)

Type:int

Parameter:

TypeParameterName
struct inode *inode
size_tsize
size_tnewsize
1800  low = newsize >> PAGE_SHIFT determines the page size
1801  high = size + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size
1803  lock for writing
1804  i_mmap_lock_read(i_mapping)
1810  If Flags, see mm.h. & VM_SHARED Then
1811  i_mmap_unlock_read(i_mapping)
1812  lease a write lock
1813  Return -ETXTBSY
1824  If Not (Flags, see mm.h. & VM_SHARED) Then Continue
1827  region = vm_region
1828  r_size = gion allocated to here - start address of region
1829  r_top = (he offset in vm_file corresponding to vm_start << PAGE_SHIFT determines the page size ) + r_size
1831  If r_top > newsize Then
1838  i_mmap_unlock_read(i_mapping)
1839  lease a write lock
1840  Return 0