Skip to content
Snippets Groups Projects
Commit 0e773a20 authored by George Joseph's avatar George Joseph Committed by Gerrit Code Review
Browse files

Merge "astobj2: Comment on OBJ_NOLOCK in ao2_container_clone." into 15

parents 89315ff0 dd35905c
No related branches found
No related tags found
No related merge requests found
...@@ -718,6 +718,9 @@ struct ao2_container *__ao2_container_clone(struct ao2_container *orig, enum sea ...@@ -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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment