kill wait_on_page_writeback_range
All callers really want the more logical filemap_fdatawait_range interface, so convert them to use it and merge wait_on_page_writeback_range into filemap_fdatawait_range. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
committed by
Jan Kara
parent
6b2f3d1f76
commit
94004ed726
@@ -453,9 +453,7 @@ int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
|
||||
|
||||
ret = 0;
|
||||
if (flags & SYNC_FILE_RANGE_WAIT_BEFORE) {
|
||||
ret = wait_on_page_writeback_range(mapping,
|
||||
offset >> PAGE_CACHE_SHIFT,
|
||||
endbyte >> PAGE_CACHE_SHIFT);
|
||||
ret = filemap_fdatawait_range(mapping, offset, endbyte);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
@@ -468,9 +466,7 @@ int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
|
||||
}
|
||||
|
||||
if (flags & SYNC_FILE_RANGE_WAIT_AFTER) {
|
||||
ret = wait_on_page_writeback_range(mapping,
|
||||
offset >> PAGE_CACHE_SHIFT,
|
||||
endbyte >> PAGE_CACHE_SHIFT);
|
||||
ret = filemap_fdatawait_range(mapping, offset, endbyte);
|
||||
}
|
||||
out:
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user