diff options
author | David Howells <dhowells@redhat.com> | 2023-09-25 15:03:03 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-09-25 15:30:28 +0300 |
commit | f1b4cb650b9a0eeba206d8f069fcdc532bfbcd74 (patch) | |
tree | f41e8cb629e39e1250c8b507d1c4380c4d8a8908 /lib/iov_iter.c | |
parent | 7d9e44a6ad8a22135e6308d330da29271f41a98a (diff) | |
download | linux-f1b4cb650b9a0eeba206d8f069fcdc532bfbcd74.tar.xz |
iov_iter: Derive user-backedness from the iterator type
Use the iterator type to determine whether an iterator is user-backed or
not rather than using a special flag for it. Now that ITER_UBUF and
ITER_IOVEC are 0 and 1, they can be checked with a single comparison.
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20230925120309.1731676-7-dhowells@redhat.com
cc: Alexander Viro <viro@zeniv.linux.org.uk>
cc: Jens Axboe <axboe@kernel.dk>
cc: Christoph Hellwig <hch@lst.de>
cc: Christian Brauner <christian@brauner.io>
cc: Matthew Wilcox <willy@infradead.org>
cc: Linus Torvalds <torvalds@linux-foundation.org>
cc: David Laight <David.Laight@ACULAB.COM>
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'lib/iov_iter.c')
-rw-r--r-- | lib/iov_iter.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 27234a820eeb..227c9f536b94 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -290,7 +290,6 @@ void iov_iter_init(struct iov_iter *i, unsigned int direction, .iter_type = ITER_IOVEC, .copy_mc = false, .nofault = false, - .user_backed = true, .data_source = direction, .__iov = iov, .nr_segs = nr_segs, |