diff options
author | David S. Miller <davem@davemloft.net> | 2014-09-24 16:48:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-24 16:48:32 -0400 |
commit | 4daaab4f0c2b55adccab08da06e17acc270cb84a (patch) | |
tree | 41dfea3867755d3853218d50533c5600ac8fa6c0 /lib | |
parent | 3c4d1daecef875d28bdbe93587908c897c29ba71 (diff) | |
parent | b94d525e58dc9638dd3f98094cb468bcfb262039 (diff) | |
download | linux-4daaab4f0c2b55adccab08da06e17acc270cb84a.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'lib')
-rw-r--r-- | lib/percpu-refcount.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c index fe5a3342e960..a89cf09a8268 100644 --- a/lib/percpu-refcount.c +++ b/lib/percpu-refcount.c @@ -184,3 +184,19 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref, call_rcu_sched(&ref->rcu, percpu_ref_kill_rcu); } EXPORT_SYMBOL_GPL(percpu_ref_kill_and_confirm); + +/* + * XXX: Temporary kludge to work around SCSI blk-mq stall. Used only by + * block/blk-mq.c::blk_mq_freeze_queue(). Will be removed during v3.18 + * devel cycle. Do not use anywhere else. + */ +void __percpu_ref_kill_expedited(struct percpu_ref *ref) +{ + WARN_ONCE(ref->pcpu_count_ptr & PCPU_REF_DEAD, + "percpu_ref_kill() called more than once on %pf!", + ref->release); + + ref->pcpu_count_ptr |= PCPU_REF_DEAD; + synchronize_sched_expedited(); + percpu_ref_kill_rcu(&ref->rcu); +} |