libublksrv: pass ' const struct ublk_io_data *' to target callback
This data is supposed to be readonly for target code.
Signed-off-by: Ming Lei <[email protected]>
diff --git a/include/ublksrv_tgt.h b/include/ublksrv_tgt.h
index 4252c1e..94a911d 100644
--- a/include/ublksrv_tgt.h
+++ b/include/ublksrv_tgt.h
@@ -117,7 +117,7 @@
int queued_tgt_io; /* obsolete */
};
-static inline struct ublk_io_tgt *__ublk_get_io_tgt_data(struct ublk_io_data *io)
+static inline struct ublk_io_tgt *__ublk_get_io_tgt_data(const struct ublk_io_data *io)
{
return (struct ublk_io_tgt *)io->private_data;
}