mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 07:48:14 +00:00
Merge "astobj2: Comment on OBJ_NOLOCK in ao2_container_clone." into 16
This commit is contained in:
@@ -718,6 +718,9 @@ struct ao2_container *__ao2_container_clone(struct ao2_container *orig, enum sea
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This test is correct. clone must be locked before calling
|
||||||
|
* ao2_container_dup when the OBJ_NOLOCK flag is set, otherwise
|
||||||
|
* we could have errors in __adjust_lock. */
|
||||||
if (flags & OBJ_NOLOCK) {
|
if (flags & OBJ_NOLOCK) {
|
||||||
ao2_wrlock(clone);
|
ao2_wrlock(clone);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user