mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
scst_copy_mgr: Fix copy manager LUN wraparound (merge r8575 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8576 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2594,8 +2594,10 @@ static int scst_cm_dev_register(struct scst_device *dev, uint64_t lun)
|
||||
add_lun = true;
|
||||
while (1) {
|
||||
lun = scst_cm_next_lun++;
|
||||
if (lun == SCST_MAX_LUN)
|
||||
if (lun == SCST_MAX_LUN) {
|
||||
scst_cm_next_lun = 0;
|
||||
continue;
|
||||
}
|
||||
if (scst_cm_is_lun_free(lun))
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user