Keep unit attention list empty flag and the list itself in sync.

Without this patch hundreds of "scst: scst_set_pending_UA:6216:Setting pending UA cmd ..." messages are logged after a LUN has been added or removed.

This patch fixes a bug that was reported by Ido Benda.

(Merged r3254 from the trunk.)


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@3255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-02-23 17:11:07 +00:00
parent d68f6300a2
commit 7f82dd8421
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -6268,6 +6268,9 @@ again:
"needed global UA %p",
ua);
list_del(&ua->UA_list_entry);
if (list_empty(&tgt_dev->UA_list))
clear_bit(SCST_TGT_DEV_UA_PENDING,
&tgt_dev->tgt_dev_flags);
mempool_free(ua, scst_ua_mempool);
break;
}
+3
View File
@@ -1815,6 +1815,9 @@ out_compl:
"REPORTED LUNS DATA CHANGED UA "
"%p", ua);
list_del(&ua->UA_list_entry);
if (list_empty(&tgt_dev->UA_list))
clear_bit(SCST_TGT_DEV_UA_PENDING,
&tgt_dev->tgt_dev_flags);
mempool_free(ua, scst_ua_mempool);
break;
}