Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\swap.c Create Date:2022-07-28 10:02:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:write_page - Write one page to given swap location.*@buf: Address we're writing.*@offset: Offset of the swap page we're writing to.*@hb: bio completion batch

Proto:static int write_page(void *buf, sector_t offset, struct hib_bio_batch *hb)

Type:int

Parameter:

TypeParameterName
void *buf
sector_toffset
struct hib_bio_batch *hb
373  If Not offset Then Return -ENOSPC
376  If hb Then
377  src = __get_free_page(GFP_NOIO | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success. | __GFP_NORETRY)
379  If src Then
380  copy_page(src, buf)
381  Else
382  ret = hib_wait_io(hb)
383  If ret Then Return ret
388  If src Then
389  copy_page(src, buf)
390  Else
391  WARN_ON_ONCE(1)
392  hb = NULL
393  src = buf
396  Else
397  src = buf
399  Return hib_submit_io(REQ_OP_WRITE, REQ_SYNC, offset, src, hb)
Caller
NameDescribe
swap_write_page
flush_swap_writer