Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:try_to_free_buffers

Proto:int try_to_free_buffers(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
3276  mapping = See page-flags.h for PAGE_MAPPING_FLAGS
3277  struct buffer_head * buffers_to_free = NULL
3278  ret = 0
3280  BUG_ON(!PageLocked(page))
3281  If Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting. Then Return 0
3284  If (mapping == NULL) Then
3285  ret = drop_buffers(page, & buffers_to_free)
3286  Go to out
3289  spin_lock( & private_lock)
3290  ret = drop_buffers(page, & buffers_to_free)
3306  If ret Then cancel_dirty_page(page)
3308  spin_unlock( & private_lock)
3309  out :
3310  If buffers_to_free Then
3311  bh = buffers_to_free
3313  Do
3316  bh = next
3317  When bh != buffers_to_free cycle
3319  Return ret
Caller
NameDescribe
pageoutpageout is called by shrink_page_list() for each dirty page.* Calls ->writepage().
__unmap_and_move
grow_dev_pageCreate the page-cache page that contains the requested block.* This is used purely for blockdev mappings.
blkdev_releasepageTry to release a page associated with block device when the system* is under memory pressure.
clean_buffersWe have our BIO, so we can now mark the buffers clean. Make* sure to only clean buffers which we know we'll be writing.