Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:simple_write_begin

Proto:int simple_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata)

Type:int

Parameter:

TypeParameterName
struct file *file
struct address_space *mapping
loff_tpos
unsignedlen
unsignedflags
struct page **pagep
void **fsdata
457  index = pos >> PAGE_SHIFT determines the page size
459  page = Find or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes.
460  If Not page Then Return -ENOMEM
463  pagep = page
465  If Not PageUptodate(page) && len != PAGE_SIZE Then
466  from = pos & PAGE_SIZE - 1
468  zero_user_segments(page, 0, from, from + len, PAGE_SIZE)
470  Return 0