diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2006-10-01 02:28:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:28 -0400 |
commit | ee0b3e671baff681d69fbf0db33b47603c0a8280 (patch) | |
tree | 3202ff815b2196c6c353bc5b28d7a2800df273ec /mm/filemap.c | |
parent | 027445c37282bc1ed26add45e573ad2d3e4860a5 (diff) |
[PATCH] Remove readv/writev methods and use aio_read/aio_write instead
This patch removes readv() and writev() methods and replaces them with
aio_read()/aio_write() methods.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 36 |
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 | } |
2422 | EXPORT_SYMBOL(generic_file_write); | 2422 | EXPORT_SYMBOL(generic_file_write); |
2423 | 2423 | ||
2424 | ssize_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 | } | ||
2436 | EXPORT_SYMBOL(generic_file_readv); | ||
2437 | |||
2438 | ssize_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 | } | ||
2458 | EXPORT_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. |