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>
This commit is contained in:
@@ -1271,7 +1271,7 @@ static int fuse_get_user_pages(struct fuse_req *req, struct iov_iter *ii,
|
||||
ssize_t ret = 0;
|
||||
|
||||
/* Special case for kernel I/O: can copy directly into the buffer */
|
||||
if (ii->type & ITER_KVEC) {
|
||||
if (iov_iter_is_kvec(ii)) {
|
||||
unsigned long user_addr = fuse_get_user_addr(ii);
|
||||
size_t frag_size = fuse_get_frag_size(ii, *nbytesp);
|
||||
|
||||
|
Reference in New Issue
Block a user