sync_page_range_nolock — write & wait on all pages in the passed range without locking
int sync_page_range_nolock
(struct inode * inode, struct address_space * mapping, loff_t pos, loff_t count);
target inode
target address_space
beginning offset in pages to write
number of bytes to write
Holding i_mutex across sync_page_range_nolock is not a good idea as it forces O_SYNC writers to different parts of the same file to be serialised right until io completion.