astobj2: Comment on OBJ_NOLOCK in ao2_container_clone.

The test for OBJ_NOLOCK looks wrong but it isn't.  Add comments to
prevent confusion.

Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
changes/90/10390/2
Corey Farrell 8 years ago
parent ec52409a53
commit 2cec36fcc3
No known key found for this signature in database
GPG Key ID: D1B6E98EB07F7F6C

@ -768,6 +768,9 @@ struct ao2_container *__ao2_container_clone(struct ao2_container *orig, enum sea
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) {
ao2_wrlock(clone);
}

Loading…
Cancel
Save