diff options
author | Jan Kara <jack@suse.cz> | 2009-08-18 20:43:15 +0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-09-14 19:08:17 +0400 |
commit | 18f2ee705d98034b0f229a3202d827468d4bffd9 (patch) | |
tree | 1da282e5eb90dc8e8a1e46214e0e7639138d3568 /mm/filemap.c | |
parent | 2f3d675bcd4a84251d6e8eea8096ec8fc795e5d6 (diff) | |
download | linux-18f2ee705d98034b0f229a3202d827468d4bffd9.tar.xz |
vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()
Remove these three functions since nobody uses them anymore.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 849293c4f418..dd51c68e2b86 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -326,70 +326,6 @@ int filemap_fdatawait_range(struct address_space *mapping, loff_t start, EXPORT_SYMBOL(filemap_fdatawait_range); /** - * sync_page_range - write and wait on all pages in the passed range - * @inode: target inode - * @mapping: target address_space - * @pos: beginning offset in pages to write - * @count: number of bytes to write - * - * Write and wait upon all the pages in the passed range. This is a "data - * integrity" operation. It waits upon in-flight writeout before starting and - * waiting upon new writeout. If there was an IO error, return it. - * - * We need to re-take i_mutex during the generic_osync_inode list walk because - * it is otherwise livelockable. - */ -int sync_page_range(struct inode *inode, struct address_space *mapping, - loff_t pos, loff_t count) -{ - pgoff_t start = pos >> PAGE_CACHE_SHIFT; - pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT; - int ret; - - if (!mapping_cap_writeback_dirty(mapping) || !count) - return 0; - ret = filemap_fdatawrite_range(mapping, pos, pos + count - 1); - if (ret == 0) { - mutex_lock(&inode->i_mutex); - ret = generic_osync_inode(inode, mapping, OSYNC_METADATA); - mutex_unlock(&inode->i_mutex); - } - if (ret == 0) - ret = wait_on_page_writeback_range(mapping, start, end); - return ret; -} -EXPORT_SYMBOL(sync_page_range); - -/** - * sync_page_range_nolock - write & wait on all pages in the passed range without locking - * @inode: target inode - * @mapping: target address_space - * @pos: beginning offset in pages to write - * @count: number of bytes to write - * - * Note: 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. - */ -int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, - loff_t pos, loff_t count) -{ - pgoff_t start = pos >> PAGE_CACHE_SHIFT; - pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT; - int ret; - - if (!mapping_cap_writeback_dirty(mapping) || !count) - return 0; - ret = filemap_fdatawrite_range(mapping, pos, pos + count - 1); - if (ret == 0) - ret = generic_osync_inode(inode, mapping, OSYNC_METADATA); - if (ret == 0) - ret = wait_on_page_writeback_range(mapping, start, end); - return ret; -} -EXPORT_SYMBOL(sync_page_range_nolock); - -/** * filemap_fdatawait - wait for all under-writeback pages to complete * @mapping: address space structure to wait for * |