svn commit: r315674 - head/sys/cam
Alexander Motin
mav at FreeBSD.org
Tue Mar 21 09:24:09 UTC 2017
Author: mav
Date: Tue Mar 21 09:24:07 2017
New Revision: 315674
URL: https://svnweb.freebsd.org/changeset/base/315674
Log:
Minor cosmetic addition to r315673.
Now CAM_SIM_LOCK() macros are not used and may be removed later.
MFC after: 2 weeks
Modified:
head/sys/cam/cam_xpt.c
Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c Tue Mar 21 09:12:41 2017 (r315673)
+++ head/sys/cam/cam_xpt.c Tue Mar 21 09:24:07 2017 (r315674)
@@ -4241,7 +4241,7 @@ xpt_async_bcast(struct async_list *async
struct cam_path *path, void *async_arg)
{
struct async_node *cur_entry;
- int lock;
+ struct mtx *mtx;
cur_entry = SLIST_FIRST(async_head);
while (cur_entry != NULL) {
@@ -4253,14 +4253,15 @@ xpt_async_bcast(struct async_list *async
*/
next_entry = SLIST_NEXT(cur_entry, links);
if ((cur_entry->event_enable & async_code) != 0) {
- lock = cur_entry->event_lock;
- if (lock)
- CAM_SIM_LOCK(path->device->sim);
+ mtx = cur_entry->event_lock ?
+ path->device->sim->mtx : NULL;
+ if (mtx)
+ mtx_lock(mtx);
cur_entry->callback(cur_entry->callback_arg,
async_code, path,
async_arg);
- if (lock)
- CAM_SIM_UNLOCK(path->device->sim);
+ if (mtx)
+ mtx_unlock(mtx);
}
cur_entry = next_entry;
}
More information about the svn-src-head
mailing list