diff options
author | David Howells <dhowells@redhat.com> | 2018-10-22 13:07:28 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-10-24 00:40:44 +0100 |
commit | 00e23707442a75b404392cef1405ab4fd498de6b (patch) | |
tree | d2d16e7863306dd0ccf6b7d528958bd9dd497820 /block | |
parent | 1fcb748d187d0c7732a75a509e924ead6d070e04 (diff) | |
download | linux-stable-00e23707442a75b404392cef1405ab4fd498de6b.tar.gz linux-stable-00e23707442a75b404392cef1405ab4fd498de6b.tar.bz2 linux-stable-00e23707442a75b404392cef1405ab4fd498de6b.zip |
iov_iter: Use accessor function
Use accessor functions to access an iterator's type and direction. This
allows for the possibility of using some other method of determining the
type of iterator than if-chains with bitwise-AND conditions.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c index 0093bed81c0e..c55f36bbe12a 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1255,7 +1255,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q, /* * success */ - if (((iter->type & WRITE) && (!map_data || !map_data->null_mapped)) || + if ((iov_iter_rw(iter) == WRITE && (!map_data || !map_data->null_mapped)) || (map_data && map_data->from_user)) { ret = bio_copy_from_iter(bio, iter); if (ret) |