Blob Blame History Raw
From: Enzo Matsumiya <ematsumiya@suse.de>
Subject: kabi: Fix nvmet error log definitions
References: bsc#1181161
Patch-mainline: Never, kabi fix

Fixes kabi brekage introduced by
patches.suse/nvmet-add-error-log-definitions.patch

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -191,9 +191,11 @@ struct nvmet_ctrl {
 	char			subsysnqn[NVMF_NQN_FIELD_LEN];
 	char			hostnqn[NVMF_NQN_FIELD_LEN];
 
+#ifndef __GENKSYMS__
 	spinlock_t		error_lock;
 	u64			err_counter;
 	struct nvme_error_slot	slots[NVMET_ERROR_LOG_SLOTS];
+#endif
 };
 
 struct nvmet_subsys {
@@ -307,8 +309,10 @@ struct nvmet_req {
 	void (*execute)(struct nvmet_req *req);
 	const struct nvmet_fabrics_ops *ops;
 
+#ifndef __GENKSYMS__
 	u16			error_loc;
 	u64			error_slba;
+#endif
 };
 
 extern struct workqueue_struct *buffered_io_wq;
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -668,8 +668,10 @@ bool nvmet_req_init(struct nvmet_req *re
 	req->rsp->status = 0;
 	req->rsp->sq_head = 0;
 	req->ns = NULL;
+#ifndef __GENKSYMS__
 	req->error_loc = -1;
 	req->error_slba = 0;
+#endif
 
 	/* no support for fused commands yet */
 	if (unlikely(flags & (NVME_CMD_FUSE_FIRST | NVME_CMD_FUSE_SECOND))) {
@@ -998,8 +1000,10 @@ u16 nvmet_alloc_ctrl(const char *subsysn
 	/* keep-alive timeout in seconds */
 	ctrl->kato = DIV_ROUND_UP(kato, 1000);
 
+#ifndef __GENKSYMS__
 	ctrl->err_counter = 0;
 	spin_lock_init(&ctrl->error_lock);
+#endif
 
 	nvmet_start_keep_alive_timer(ctrl);