From b34cf85d839a1deeaa00b74ac8c01bdef1f6aff2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 27 Mar 2016 22:44:44 +0000 Subject: [PATCH] scst_sysfs: Report LUN replacement failure correctly This is a follow-up for r6834. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6854 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 5556b5735..43b769591 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1447,6 +1447,8 @@ static int __scst_process_luns_mgmt_store(char *buffer, res = scst_acg_repl_lun(acg, tgt_kobj ? tgt->tgt_luns_kobj : acg->luns_kobj, dev, virt_lun, flags); + if (res != 0) + goto out_unlock; break; } case SCST_LUN_ACTION_DEL: