Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Add a page to the dirty page list.* It is a sad fact of life that this function is called from several places* deeply under spinlocking. It may not sleep.* If the page has buffers, the uptodate buffers are set dirty, to preserve

Proto:int __set_page_dirty_buffers(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
659  mapping = page_mapping(page)
661  If Value for the false possibility is greater at compile time(!mapping) Then Return Not TestSetPageDirty(page)
664  spin_lock( & private_lock)
665  If page_has_buffers(page) Then
666  head = If we *know* page->private refers to buffer_heads (page)
667  bh = head
669  Do
672  When bh != head cycle
678  lock_page_memcg - lock a page->mem_cgroup binding*@page: the page* This function protects unlocked LRU pages from being moved to* another cgroup
679  newly_dirty = Not TestSetPageDirty(page)
680  spin_unlock( & private_lock)
682  If newly_dirty Then Mark the page dirty, and set it dirty in the page cache, and mark the inode* dirty.* If warn is true, then emit a warning if the page is not uptodate and has* not been truncated.* The caller must hold lock_page_memcg().
685  lock_page_memcg - unlock a page->mem_cgroup binding*@page: the page
687  If newly_dirty Then __mark_inode_dirty - internal function*@inode: inode to mark*@flags: what kind of dirty (i
690  Return newly_dirty