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/btrfs/file.c | |
parent | 0ae5e4d370599592eab845527b31708a4f3411be (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/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1dafe0701daf..a0a94a30d85a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1726,12 +1726,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, | |||
1726 | 1726 | ||
1727 | mutex_lock(&inode->i_mutex); | 1727 | mutex_lock(&inode->i_mutex); |
1728 | 1728 | ||
1729 | err = generic_segment_checks(iov, &nr_segs, &ocount, VERIFY_READ); | 1729 | count = ocount = iov_length(iov, nr_segs); |
1730 | if (err) { | ||
1731 | mutex_unlock(&inode->i_mutex); | ||
1732 | goto out; | ||
1733 | } | ||
1734 | count = ocount; | ||
1735 | 1730 | ||
1736 | current->backing_dev_info = inode->i_mapping->backing_dev_info; | 1731 | current->backing_dev_info = inode->i_mapping->backing_dev_info; |
1737 | err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode)); | 1732 | err = generic_write_checks(file, &pos, &count, S_ISBLK(inode->i_mode)); |