summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-08-12 09:22:40 +0200
committerChristian Brauner <brauner@kernel.org>2026-08-12 09:22:40 +0200
commit9948bc9aa1c2e5e77ab989a8e5d5eec829e967d5 (patch)
treecc673c0010c915fb3ca9b1ec2abc311c39e4d871
parent7c7fe554f40adac2a7f8d9b6d5886ca332edd496 (diff)
parentaccb6624e383872e7703974a5d5826755fb27032 (diff)
Merge patch series "fixes for iomap_bio_read_folio_range_sync"
Christoph Hellwig <hch@lst.de> says: Two fixes for iomap_bio_read_folio_range_sync, a potential kernel crash when tweaking the device integrity behvavior using sysfs, and a missing bio_uninit that the Sashiko review of the first fix found. * patches from https://patch.msgid.link/20260804124404.737145-1-hch@lst.de: iomap: iomap_bio_read_folio_range_sync is missing a call to bio_uninit iomap: don't free integrity payload that doesn't exist Link: https://patch.msgid.link/20260804124404.737145-1-hch@lst.de Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
-rw-r--r--fs/iomap/bio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/iomap/bio.c b/fs/iomap/bio.c
index 4504f4633f17..24969b71a965 100644
--- a/fs/iomap/bio.c
+++ b/fs/iomap/bio.c
@@ -170,10 +170,11 @@ int iomap_bio_read_folio_range_sync(const struct iomap_iter *iter,
if (srcmap->flags & IOMAP_F_INTEGRITY)
fs_bio_integrity_alloc(&bio);
error = submit_bio_wait(&bio);
- if (srcmap->flags & IOMAP_F_INTEGRITY) {
+ if (bio_integrity(&bio)) {
if (!error)
error = fs_bio_integrity_verify(&bio, sector, len);
fs_bio_integrity_free(&bio);
}
+ bio_uninit(&bio);
return error;
}