Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-28 20:14:09
Last Modify:2020-03-18 10:38:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lock_invalidatepage - invalidate part or all of a buffer-backed page*@page: the page which is affected*@offset: start of the range to invalidate*@length: length of the range to invalidate* block_invalidatepage() is called when all or part of the page has

Proto:void block_invalidatepage(struct page *page, unsigned int offset, unsigned int length)

Type:void

Parameter:

TypeParameterName
struct page *page
unsigned intoffset
unsigned intlength
1502  curr_off = 0
1503  stop = length + offset
1505  BUG_ON(!PageLocked(page))
1506  If Not page_has_buffers(page) Then Go to out
1512  BUG_ON(stop > PAGE_SIZE || stop < length)
1514  head = If we *know* page->private refers to buffer_heads (page)
1515  bh = head
1516  Do
1517  next_off = curr_off + size of mapping
1518  next = circular list of page's buffers
1523  If next_off > stop Then Go to out
1529  If offset <= curr_off Then discard_buffer(bh)
1531  curr_off = next_off
1532  bh = next
1533  When bh != head cycle
1540  If length == PAGE_SIZE Then ry_to_release_page() - release old fs-specific metadata on a page*@page: the page which the kernel is trying to free*@gfp_mask: memory allocation flags (and I/O mode)* The address_space is to try to release any data against the page
1542  out :
1543  Return