]> git.proxmox.com Git - mirror_spl-debian.git/commit
kmem-cache: spl_kmem_cache_create() may always sleep
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 10 Dec 2012 19:01:08 +0000 (11:01 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 12 Dec 2012 17:56:54 +0000 (09:56 -0800)
commit296a8e596dac344cf3af5e7f2dff5be12c979d80
treeab570d57ac45da745cb133921391fe8b76d438d1
parenta5a98e72605c071f94b9fdc4bf1811f8ed8d7f32
kmem-cache: spl_kmem_cache_create() may always sleep

When this code was originally written I went overboard and allowed
for the possibility of creating a cache in an atomic context.  In
practice there are no callers which ever do this.  This makes sense
since a cache is by design a long lived data structure.

To prevent abuse of this function going forward I'm removing the
code which is supported to handle an atomic context.  All allocators
have been updated to use KM_SLEEP and the might_sleep() debug macro
has been added to immediately detect atomic callers.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/spl/spl-kmem.c