diff options
author | Ming Lei <ming.lei@redhat.com> | 2023-05-20 17:11:34 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-05-21 04:18:32 +0200 |
commit | b8b637d770ef7aa9bc3971670cc8532b1f0d757e (patch) | |
tree | 27d9b81aff25f8e5e1d3551e3e06a4e7757f7352 | |
parent | block: don't plug in blkdev_write_iter (diff) | |
download | linux-b8b637d770ef7aa9bc3971670cc8532b1f0d757e.tar.xz linux-b8b637d770ef7aa9bc3971670cc8532b1f0d757e.zip |
ublk: fix build warning on iov_iter_get_pages2
Return type of iov_iter_get_pages2() is ssize_t instead of size_t, so
fix it.
Fixes: 981f95a571e3 ("ublk: cleanup ublk_copy_user_pages")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230520151134.459679-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/ublk_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index e00733b6fea8..539eada32861 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -564,7 +564,8 @@ static size_t ublk_copy_user_pages(const struct request *req, while (iov_iter_count(uiter) && iter.bio) { unsigned nr_pages; - size_t len, off; + ssize_t len; + size_t off; int i; len = iov_iter_get_pages2(uiter, iter.pages, |