aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
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 /fs/xfs
parent0ae5e4d370599592eab845527b31708a4f3411be (diff)
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 'fs/xfs')
-rw-r--r--fs/xfs/xfs_file.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 8617497867c7..f0f8084a67be 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -253,9 +253,7 @@ xfs_file_aio_read(
253 if (file->f_mode & FMODE_NOCMTIME) 253 if (file->f_mode & FMODE_NOCMTIME)
254 ioflags |= IO_INVIS; 254 ioflags |= IO_INVIS;
255 255
256 ret = generic_segment_checks(iovp, &nr_segs, &size, VERIFY_WRITE); 256 size = iov_length(iovp, nr_segs);
257 if (ret < 0)
258 return ret;
259 257
260 if (unlikely(ioflags & IO_ISDIRECT)) { 258 if (unlikely(ioflags & IO_ISDIRECT)) {
261 xfs_buftarg_t *target = 259 xfs_buftarg_t *target =
@@ -777,10 +775,7 @@ xfs_file_aio_write(
777 775
778 BUG_ON(iocb->ki_pos != pos); 776 BUG_ON(iocb->ki_pos != pos);
779 777
780 ret = generic_segment_checks(iovp, &nr_segs, &ocount, VERIFY_READ); 778 ocount = iov_length(iovp, nr_segs);
781 if (ret)
782 return ret;
783
784 if (ocount == 0) 779 if (ocount == 0)
785 return 0; 780 return 0;
786 781