lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1196095460975-git-send-email-ezk@cs.sunysb.edu>
Date:	Mon, 26 Nov 2007 11:44:13 -0500
From:	Erez Zadok <ezk@...sunysb.edu>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	viro@....linux.org.uk, hch@...radead.org,
	Erez Zadok <ezk@...sunysb.edu>
Subject: [PATCH 16/16] Unionfs: use generic_file_aio_read/write

There's no apparent need to define our own aio_read/write methods.

Signed-off-by: Erez Zadok <ezk@...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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ