Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:nobh_write_end

Proto:int nobh_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata)

Type:int

Parameter:

TypeParameterName
struct file *file
struct address_space *mapping
loff_tpos
unsignedlen
unsignedcopied
struct page *page
void *fsdata
2719  inode = host
2720  head = fsdata
2722  BUG_ON(fsdata != NULL && page_has_buffers(page))
2724  If Value for the false possibility is greater at compile time(copied < len) && head Then Attach the singly-linked list of buffers created by nobh_write_begin, to* the page (converting it to circular linked list and taking care of page* dirty races).
2726  If page_has_buffers(page) Then Return generic_write_end(file, mapping, pos, len, copied, page, fsdata)
2730  SetPageUptodate(page)
2731  Dirty a page
2732  If pos + copied > i_size Then
2733  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.
2734  mark_inode_dirty(inode)
2737  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.
2738  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
2740  When head cycle
2741  bh = head
2742  head = circular list of page's buffers
2743  free_buffer_head(bh)
2746  Return copied