Commit 712ab983 authored by Mike Gerdts's avatar Mike Gerdts Committed by Ben Walker
Browse files

blob: set rc to -EINVAL when esnap len too long



When bs_create_blob() is creating the internal xattr for the esnap ID,
it errors out if the ID is too long. This error path neglected to set
the return value. It now returns -EINVAL in this case.

Signed-off-by: default avatarMike Gerdts <mgerdts@nvidia.com>
Change-Id: I6d756da47f41fb554cd6782add63378e81735118
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17292


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 6a55d0db
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6029,6 +6029,7 @@ bs_create_blob(struct spdk_blob_store *bs,
		if (opts_local.esnap_id_len > UINT16_MAX) {
			SPDK_ERRLOG("esnap id length %" PRIu64 "is too long\n",
				    opts_local.esnap_id_len);
			rc = -EINVAL;
			goto error;

		}