diff options
author | 2018-10-22 13:07:28 +0100 | |
---|---|---|
committer | 2018-10-24 00:40:44 +0100 | |
commit | 00e23707442a75b404392cef1405ab4fd498de6b (patch) | |
tree | d2d16e7863306dd0ccf6b7d528958bd9dd497820 /fs/iomap.c | |
parent | amd-gpu: Don't undefine READ and WRITE (diff) | |
download | linux-00e23707442a75b404392cef1405ab4fd498de6b.tar.gz linux-00e23707442a75b404392cef1405ab4fd498de6b.tar.bz2 linux-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 'fs/iomap.c')
-rw-r--r-- | fs/iomap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/iomap.c b/fs/iomap.c index ec15cf2ec696..2c53400aa802 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -1795,7 +1795,7 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, if (pos >= dio->i_size) goto out_free_dio; - if (iter->type == ITER_IOVEC) + if (iter_is_iovec(iter) && iov_iter_rw(iter) == READ) dio->flags |= IOMAP_DIO_DIRTY; } else { flags |= IOMAP_WRITE; |