[PATCH] only unbind outgoing users which are actually bound to a target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When multiple targets were bound to different (unique) outgoing users,
deleting one outgoing user would unbind the (different) outgoing user
from all targets.

This corresponds to fedora bug
https://bugzilla.redhat.com/show_bug.cgi?id=712638

The following patch fixes the problem:

--- usr/target.c.outgoing-user-check	2010-01-22 10:30:00.000000000 +1030
+++ usr/target.c	2011-06-15 21:51:56.000000000 +0930
@@ -1301,7 +1301,7 @@
 			if (i == target->account.max_inaccount)
 				err = TGTADM_NO_USER;
 		} else
-			if (target->account.out_aid)
+			if (target->account.out_aid == ac->aid)
 				target->account.out_aid = 0;
 			else
 				err = TGTADM_NO_USER;
 


-- 
Ian Dall <ian@xxxxxxxxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux