aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/cxlflash/vlun.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/cxlflash/vlun.c b/drivers/scsi/cxlflash/vlun.c
index 68994c42c81f..96b074f701e8 100644
--- a/drivers/scsi/cxlflash/vlun.c
+++ b/drivers/scsi/cxlflash/vlun.c
@@ -915,16 +915,9 @@ int cxlflash_disk_virtual_open(struct scsi_device *sdev, void *arg)
915 915
916 pr_debug("%s: ctxid=%llu ls=0x%llx\n", __func__, ctxid, lun_size); 916 pr_debug("%s: ctxid=%llu ls=0x%llx\n", __func__, ctxid, lun_size);
917 917
918 /* Setup the LUNs block allocator on first call */
918 mutex_lock(&gli->mutex); 919 mutex_lock(&gli->mutex);
919 if (gli->mode == MODE_NONE) { 920 if (gli->mode == MODE_NONE) {
920 /* Setup the LUN table and block allocator on first call */
921 rc = init_luntable(cfg, lli);
922 if (rc) {
923 dev_err(dev, "%s: call to init_luntable failed "
924 "rc=%d!\n", __func__, rc);
925 goto err0;
926 }
927
928 rc = init_vlun(lli); 921 rc = init_vlun(lli);
929 if (rc) { 922 if (rc) {
930 dev_err(dev, "%s: call to init_vlun failed rc=%d!\n", 923 dev_err(dev, "%s: call to init_vlun failed rc=%d!\n",
@@ -942,6 +935,13 @@ int cxlflash_disk_virtual_open(struct scsi_device *sdev, void *arg)
942 } 935 }
943 mutex_unlock(&gli->mutex); 936 mutex_unlock(&gli->mutex);
944 937
938 rc = init_luntable(cfg, lli);
939 if (rc) {
940 dev_err(dev, "%s: call to init_luntable failed rc=%d!\n",
941 __func__, rc);
942 goto err1;
943 }
944
945 ctxi = get_context(cfg, rctxid, lli, 0); 945 ctxi = get_context(cfg, rctxid, lli, 0);
946 if (unlikely(!ctxi)) { 946 if (unlikely(!ctxi)) {
947 dev_err(dev, "%s: Bad context! (%llu)\n", __func__, ctxid); 947 dev_err(dev, "%s: Bad context! (%llu)\n", __func__, ctxid);