函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-29 10:40:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:simple_write_end - .write_end helper for non-block-device FSes*@file: See .write_end of address_space_operations*@mapping: "*@pos: "*@len: "*@copied: "*@page: "*@fsdata: "* simple_write_end does the minimum needed for updating a page after writing is

函数原型:int simple_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata)

返回类型:int

参数:

类型参数名称
struct file *file
struct address_space *mapping
loff_tpos
unsignedlen
unsignedcopied
struct page *page
void *fsdata
500  inode等于host
501  last_pos等于poscopied
504  如果非PageUptodate(page)则
505  如果copied小于len
506  from等于pos按位与PAGE_SIZE减1
510  SetPageUptodate(page)
516  如果last_pos大于i_sizeNOTE: unlike i_size_read(), i_size_write() does need locking around it* (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount* can be lost, resulting in subsequent i_size_read() calls spinning forever.
519  Dirty a page
520  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.
521  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
523  返回:copied