diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-04 15:24:06 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 17:32:43 -0400 |
commit | cb66a7a1f149ff705fa37cad6d1252b046e0ad4f (patch) | |
tree | 32dd17f294e9ef96bfea727bba313a33590917ab /fs/ocfs2 | |
parent | 0ae5e4d370599592eab845527b31708a4f3411be (diff) | |
download | op-kernel-dev-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.zip op-kernel-dev-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.tar.gz |
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/ocfs2')
-rw-r--r-- | fs/ocfs2/file.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index d6d78c2..d33c4ce 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2355,12 +2355,7 @@ relock: /* communicate with ocfs2_dio_end_io */ ocfs2_iocb_set_rw_locked(iocb, rw_level); - ret = generic_segment_checks(iov, &nr_segs, &ocount, - VERIFY_READ); - if (ret) - goto out_dio; - - count = ocount; + count = ocount = iov_length(iov, nr_segs); ret = generic_write_checks(file, ppos, &count, S_ISBLK(inode->i_mode)); if (ret) |