summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-04 15:24:06 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:43 -0400
commitcb66a7a1f149ff705fa37cad6d1252b046e0ad4f (patch)
tree32dd17f294e9ef96bfea727bba313a33590917ab /drivers/staging
parent0ae5e4d370599592eab845527b31708a4f3411be (diff)
downloadlinux-stable-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.tar.gz
linux-stable-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.tar.bz2
linux-stable-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.zip
kill generic_segment_checks()
all callers of ->aio_read() and ->aio_write() have iov/nr_segs already checked - generic_segment_checks() done after that is just an odd way to spell iov_length(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/llite/file.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 8e844a6371e0..220bd8390a84 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -1180,9 +1180,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
ssize_t result;
int refcheck;
- result = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
- if (result)
- return result;
+ count = iov_length(iov, nr_segs);
env = cl_env_get(&refcheck);
if (IS_ERR(env))
@@ -1235,14 +1233,10 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
{
struct lu_env *env;
struct vvp_io_args *args;
- size_t count = 0;
+ size_t count = iov_length(iov, nr_segs);
ssize_t result;
int refcheck;
- result = generic_segment_checks(iov, &nr_segs, &count, VERIFY_READ);
- if (result)
- return result;
-
env = cl_env_get(&refcheck);
if (IS_ERR(env))
return PTR_ERR(env);