vfs: Introduce new helpers for syncing after writing to O_SYNC file or IS_SYNC inode
Introduce new function for generic inode syncing (vfs_fsync_range) and use
it from fsync() path. Introduce also new helper for syncing after a sync
write (generic_write_sync) using the generic function.
Use these new helpers for syncing from generic VFS functions. This makes
O_SYNC writes to block devices acquire i_mutex for syncing. If we really
care about this, we can make block_fsync() drop the i_mutex and reacquire
it before it returns.
CC: Evgeniy Polyakov <[email protected]>
CC: [email protected]
CC: Joel Becker <[email protected]>
CC: Felix Blyakher <[email protected]>
CC: [email protected]
CC: Anton Altaparmakov <[email protected]>
CC: [email protected]
CC: OGAWA Hirofumi <[email protected]>
CC: [email protected]
CC: [email protected]
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jan Kara <[email protected]>