sync_page_range — write and wait on all pages in the passed range
int sync_page_range ( | struct inode * inode, |
| struct address_space * mapping, | |
| loff_t pos, | |
loff_t count); |
inodetarget inode
mappingtarget address_space
posbeginning offset in pages to write
countnumber of bytes to write
Write and wait upon all the pages in the passed range. This is a “data integrity” operation. It waits upon in-flight writeout before starting and waiting upon new writeout. If there was an IO error, return it.
We need to re-take i_mutex during the generic_osync_inode list walk because it is otherwise livelockable.