aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index f6c1d22b504f..48497094ae83 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2421,42 +2421,6 @@ ssize_t generic_file_write(struct file *file, const char __user *buf,
2421} 2421}
2422EXPORT_SYMBOL(generic_file_write); 2422EXPORT_SYMBOL(generic_file_write);
2423 2423
2424ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
2425 unsigned long nr_segs, loff_t *ppos)
2426{
2427 struct kiocb kiocb;
2428 ssize_t ret;
2429
2430 init_sync_kiocb(&kiocb, filp);
2431 ret = __generic_file_aio_read(&kiocb, iov, nr_segs, ppos);
2432 if (-EIOCBQUEUED == ret)
2433 ret = wait_on_sync_kiocb(&kiocb);
2434 return ret;
2435}
2436EXPORT_SYMBOL(generic_file_readv);
2437
2438ssize_t generic_file_writev(struct file *file, const struct iovec *iov,
2439 unsigned long nr_segs, loff_t *ppos)
2440{
2441 struct address_space *mapping = file->f_mapping;
2442 struct inode *inode = mapping->host;
2443 ssize_t ret;
2444
2445 mutex_lock(&inode->i_mutex);
2446 ret = __generic_file_write_nolock(file, iov, nr_segs, ppos);
2447 mutex_unlock(&inode->i_mutex);
2448
2449 if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
2450 int err;
2451
2452 err = sync_page_range(inode, mapping, *ppos - ret, ret);
2453 if (err < 0)
2454 ret = err;
2455 }
2456 return ret;
2457}
2458EXPORT_SYMBOL(generic_file_writev);
2459
2460/* 2424/*
2461 * Called under i_mutex for writes to S_ISREG files. Returns -EIO if something 2425 * Called under i_mutex for writes to S_ISREG files. Returns -EIO if something
2462 * went wrong during pagecache shootdown. 2426 * went wrong during pagecache shootdown.