Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory-failure.c Create Date:2022-07-28 16:19:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Safely get reference count of an arbitrary page.* Returns 0 for a free page, -EIO for a zero refcount page* that is not free, and 1 for any other page type.* For 1 the page is returned with increased page count, otherwise not.

Proto:static int __get_any_page(struct page *p, unsigned long pfn, int flags)

Type:int

Parameter:

TypeParameterName
struct page *p
unsigned longpfn
intflags
1616  If flags & MF_COUNT_INCREASED Then Return 1
1623  If Not get_hwpoison_page() - Get refcount for memory error handling:*@page: raw error page (hit by memory error)* Return: return 0 if failed to grab the refcount, otherwise true (some* non-zero value.) Then
1625  pr_info("%s: %#lx free huge page\n", __func__, pfn)
1626  ret = 0
1627  Else if is_free_buddy_page(p) Then
1628  pr_info("%s: %#lx free buddy page\n", __func__, pfn)
1629  ret = 0
1630  Else
1631  pr_info("%s: %#lx: unknown zero refcount page type %lx\n", __func__, pfn, Atomic flags, some possibly * updated asynchronously )
1633  ret = -EIO
1635  Else
1637  ret = 1
1639  Return ret
Caller
NameDescribe
get_any_page