Skip to content
Commit 687b0ad2 authored by Kent Overstreet's avatar Kent Overstreet Committed by Tejun Heo
Browse files

percpu-refcount: Add a WARN() for ref going negative



AIO had a missing get, which led to an ioctx leak - after percpu_ref_kill() the
ref was 0 so percpu_ref_put() never saw it hit 0.

This wasn't noticed at the time because it all happened completely silently,
this adds a WARN() which would've caught the aio bug.

tj: Used WARN_ONCE() instead of WARN().

Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 6ce4eac1
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