diff options
author | Ming Lei <ming.lei@redhat.com> | 2023-05-20 23:11:34 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-05-20 20:18:32 -0600 |
commit | b8b637d770ef7aa9bc3971670cc8532b1f0d757e (patch) | |
tree | 27d9b81aff25f8e5e1d3551e3e06a4e7757f7352 /drivers | |
parent | 712c7364655f69827d0b96f69594886ecbfb412f (diff) | |
download | linux-stable-b8b637d770ef7aa9bc3971670cc8532b1f0d757e.tar.gz linux-stable-b8b637d770ef7aa9bc3971670cc8532b1f0d757e.tar.bz2 linux-stable-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>
Diffstat (limited to 'drivers')
-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, |