summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-02 13:56:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-02 13:56:48 +0200
commit0e509f537f8ddd89f237e62f77818dbdbc8be395 (patch)
tree4e747a1cad81d0c085d435923366bcce30484bc8 /block/bio.c
parentfirmware_loader: Move definitions from sysfs_upload.h to sysfs.h (diff)
parentLinux 5.18-rc5 (diff)
downloadlinux-0e509f537f8ddd89f237e62f77818dbdbc8be395.tar.xz
linux-0e509f537f8ddd89f237e62f77818dbdbc8be395.zip
Merge 5.18-rc5 into driver-core-next
We need the kernfs/driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index cdd7b2915c53..4259125e16ab 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1598,7 +1598,7 @@ EXPORT_SYMBOL(bio_split);
void bio_trim(struct bio *bio, sector_t offset, sector_t size)
{
if (WARN_ON_ONCE(offset > BIO_MAX_SECTORS || size > BIO_MAX_SECTORS ||
- offset + size > bio->bi_iter.bi_size))
+ offset + size > bio_sectors(bio)))
return;
size <<= 9;