diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-04 21:24:06 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 23:32:43 +0200 |
commit | cb66a7a1f149ff705fa37cad6d1252b046e0ad4f (patch) | |
tree | 32dd17f294e9ef96bfea727bba313a33590917ab /fs/ocfs2/file.c | |
parent | __btrfs_direct_write(): switch to iov_iter (diff) | |
download | linux-cb66a7a1f149ff705fa37cad6d1252b046e0ad4f.tar.xz linux-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 'fs/ocfs2/file.c')
-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 d6d78c2aa96e..d33c4ced0baf 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) |