lkml.org 
[lkml]   [2007]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 16/16] Unionfs: use generic_file_aio_read/write
Date
There's no apparent need to define our own aio_read/write methods.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
fs/unionfs/file.c | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
index b7d0d55..c922173 100644
--- a/fs/unionfs/file.c
+++ b/fs/unionfs/file.c
@@ -37,29 +37,6 @@ out:
return err;
}

-static ssize_t unionfs_aio_read(struct kiocb *iocb, const struct iovec *iov,
- unsigned long nr_segs, loff_t pos)
-{
- int err = 0;
- struct file *file = iocb->ki_filp;
-
- unionfs_read_lock(file->f_path.dentry->d_sb);
- err = unionfs_file_revalidate(file, false);
- if (unlikely(err))
- goto out;
- unionfs_check_file(file);
-
- err = generic_file_aio_read(iocb, iov, nr_segs, pos);
-
- if (err == -EIOCBQUEUED)
- err = wait_on_sync_kiocb(iocb);
-
-out:
- unionfs_check_file(file);
- unionfs_read_unlock(file->f_path.dentry->d_sb);
- return err;
-}
-
static ssize_t unionfs_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
@@ -234,9 +211,9 @@ out:
struct file_operations unionfs_main_fops = {
.llseek = generic_file_llseek,
.read = unionfs_read,
- .aio_read = unionfs_aio_read,
+ .aio_read = generic_file_aio_read,
.write = unionfs_write,
- .aio_write = generic_file_aio_write,
+ .aio_write = generic_file_aio_write,
.readdir = unionfs_file_readdir,
.unlocked_ioctl = unionfs_ioctl,
.mmap = unionfs_mmap,
--
1.5.2.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-26 17:51    [W:0.190 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site