Commit 8bd26421 authored by Kristof Provost's avatar Kristof Provost
Browse files

callout: fix using shared rmlocks

15b1eb14 changed the callout code to store the CALLOUT_SHAREDLOCK flag
in c_iflags (where it used to be c_flags), but failed to update the
check in softclock_call_cc(). This resulted in the callout code always
taking the write lock, even if a read lock had been requested (with
the CALLOUT_SHAREDLOCK flag in callout_init_rm()).

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:

(cherry picked from commit a879e40c)
parent 7bc8d9ed
......@@ -673,7 +673,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc,
("softclock_call_cc: act %p %x", c, c->c_flags));
class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL;
lock_status = 0;
if (c->c_flags & CALLOUT_SHAREDLOCK) {
if (c->c_iflags & CALLOUT_SHAREDLOCK) {
if (class == &lock_class_rm)
lock_status = (uintptr_t)&tracker;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment