mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
de0617e467
commit
22f96b3808
2 changed files with 76 additions and 66 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue