函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:generic_write_end

函数原型:int generic_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
2169  inode等于host
2170  old_size等于i_size
2171  bool i_size_changed = false
2173  copied等于block_write_end(file, mapping, pos, len, copied, page, fsdata)
2182  如果poscopied大于i_size
2183  NOTE: 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.
2184  i_size_changed = true
2187  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.
2188  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
2190  如果old_size小于pospagecache_isize_extended - update pagecache after extension of i_size*@inode: inode for which i_size was extended*@from: original inode size*@to: new inode size* Handle extension of inode size either caused by extending truncate or by
2198  如果i_size_changedmark_inode_dirty(inode)
2200  返回:copied
调用者
名称描述
nobh_write_end