diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-04-09 14:51:48 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-02 14:08:53 -0600 |
commit | 22f96b3808c12a218e9a3bce6e1bfbd74efbe374 (patch) | |
tree | 3a8808dea0867ba433751932bac0c264a4284df1 /include/linux/fs.h | |
parent | de0617e467171ba44c73efd1ba63f101b164a035 (diff) |
fs: add sync_file_range() helper
This just pulls out the ksys_sync_file_range() code to work on a struct
file instead of an fd, so we can use it elsewhere.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index dd28e7679089..2f66e247ecba 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2785,6 +2785,9 @@ extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync); extern int vfs_fsync(struct file *file, int datasync); +extern int sync_file_range(struct file *file, loff_t offset, loff_t nbytes, + unsigned int flags); + /* * Sync the bytes written if this was a synchronous write. Expect ki_pos * to already be updated for the write, and will return either the amount |