aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-05-08 21:49:48 -0600
committerJens Axboe <axboe@kernel.dk>2021-05-08 21:49:48 -0600
commit35c820e71565d1fa835b82499359218b219828ac (patch)
tree0a0552df281f125706f631fdd6aed0af7103908e /include/linux/bio.h
parentblock: reexpand iov_iter after read/write (diff)
downloadlinux-dev-35c820e71565d1fa835b82499359218b219828ac.tar.xz
linux-dev-35c820e71565d1fa835b82499359218b219828ac.zip
Revert "bio: limit bio max size"
This reverts commit cd2c7545ae1beac3b6aae033c7f31193b3255946. Alex reports that the commit causes corruption with LUKS on ext4. Revert it for now so that this can be investigated properly. Link: https://lore.kernel.org/linux-block/1620493841.bxdq8r5haw.none@localhost/ Reported-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index f1a99f0a240c..a0b4cfdf62a4 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -106,8 +106,6 @@ static inline void *bio_data(struct bio *bio)
return NULL;
}
-extern unsigned int bio_max_size(struct bio *bio);
-
/**
* bio_full - check if the bio is full
* @bio: bio to check
@@ -121,7 +119,7 @@ static inline bool bio_full(struct bio *bio, unsigned len)
if (bio->bi_vcnt >= bio->bi_max_vecs)
return true;
- if (bio->bi_iter.bi_size > bio_max_size(bio) - len)
+ if (bio->bi_iter.bi_size > UINT_MAX - len)
return true;
return false;