Skip to contentSkip to conversation

block: make bio_integrity_map_user() static inline

PATCH New Ruslan Valiyev 1 participant 1 message May 29

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: make bio_integrity_map_user() static inline

From: Jens Axboe <[email protected]>

If CONFIG_BLK_DEV_INTEGRITY isn't set, then the dummy helper must be static inline to avoid complaints about the function being unused.

Fixes fe8f4ca7107e ("block: modify bio_integrity_map_user to accept iov_iter as argument")
(cherry picked from commit 546d191427cf5cf3215529744c2ea8558f0279db)

The same build break is now reported on stable-rc/linux-6.12.y by KernelCI.

Verified the upstream cherry-pick applies cleanly on top of 97928cc88900a (Linux 6.12.92-rc1) and that block/bdev.o + block/fops.o compile cleanly afterwards with i386_defconfig (which leaves CONFIG_BLK_DEV_INTEGRITY unset). Without the fix both files trip:

include/linux/bio-integrity.h:101:12: error: 'bio_integrity_map_user' defined but not used [-Werror=unused-function]

---
 include/linux/bio-integrity.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/bio-integrity.h +1 -1
index be91479b2c42d..53f6dbd2816e0 100644
@@ -98,7 +98,7 @@ static inline void bioset_integrity_free(struct bio_set *bs)
 {
 }
 
-static int bio_integrity_map_user(struct bio *bio, struct iov_iter *iter)
+static inline int bio_integrity_map_user(struct bio *bio, struct iov_iter *iter)
 {
 	return -EINVAL;
 }

base-commit: 97928cc88900a9fb07a4dddbd1db19eb0ce55c56

Signature · 1 line
2.43.0