函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-29 10:45:26
Last Modify:2020-03-18 10:38:29 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:try_to_free_buffers

函数原型:int try_to_free_buffers(struct page *page)

返回类型:int

参数:

类型参数名称
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  如果Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.则返回:0
3284  如果(mapping == NULL)则
3285  ret等于drop_buffers(page, & buffers_to_free)
3286  转到:out
3289  加自旋锁
3290  ret等于drop_buffers(page, & buffers_to_free)
3306  如果retcancel_dirty_page(page)
3308  自旋锁解锁
3309  out :
3310  如果buffers_to_free
3311  bh等于buffers_to_free
3313  循环
3316  bh等于next
3317 bh不等于buffers_to_free循环
3319  返回:ret
调用者
名称描述
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.
try_to_release_pagery_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