> if (bio->bi_bdev) { > size_t trim = size & (bdev_logical_block_size(bio->bi_bdev) - 1); > - iov_iter_revert(iter, trim); > - size -= trim; > + > + if (trim) { > + iov_iter_revert(iter, trim); > + size -= trim; > + } We also need to fix this. This isn't supposed to be called without a bdev set, but Kent broke this. But if we don't have a bdev we need to pass the block size manually and still do the revert if needed.