Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lock_page_mkwrite() is not allowed to change the file size as it gets* called from a page fault handler when a page is first dirtied

Proto:int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, get_block_t get_block)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
struct vm_fault *vmf
get_block_tget_block
2499  page = page
2500  inode = file_inode(File we map to (can be NULL). )
2505  lock_page may only be called if we have the page's inode pinned.
2506  size = NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
2507  If See page-flags.h for PAGE_MAPPING_FLAGS != i_mapping || Return byte-offset into filesystem object for page. > size Then
2510  ret = -EFAULT
2511  Go to out_unlock
2515  If Our offset within mapping. + 1 << PAGE_SHIFT determines the page size > size Then end = size & ~PAGE_MASK
2517  Else end = PAGE_SIZE
2520  ret = __block_write_begin(page, 0, end, get_block)
2521  If Not ret Then ret = block_commit_write(page, 0, end)
2524  If Value for the false possibility is greater at compile time(ret < 0) Then Go to out_unlock
2526  Dirty a page
2527  wait_for_stable_page() - wait for writeback to finish, if necessary.*@page: The page to wait on.* This function determines if the given page is related to a backing device* that requires page contents to be held stable during writeback. If so, then
2528  Return 0
2529  out_unlock :
2530  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2531  Return ret