Commit 0a806cfd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

dm-integrity: stop using bio_devname



Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220304180105.409765-6-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 66671719
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1788,12 +1788,11 @@ static void integrity_metadata(struct work_struct *w)
						checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
			if (unlikely(r)) {
				if (r > 0) {
					char b[BDEVNAME_SIZE];
					sector_t s;

					s = sector - ((r + ic->tag_size - 1) / ic->tag_size);
					DMERR_LIMIT("%s: Checksum failed at sector 0x%llx",
						    bio_devname(bio, b), s);
					DMERR_LIMIT("%pg: Checksum failed at sector 0x%llx",
						    bio->bi_bdev, s);
					r = -EILSEQ;
					atomic64_inc(&ic->number_of_mismatches);
					dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum",