Commit e550107b authored by Li Shaohua's avatar Li Shaohua Committed by Linus Torvalds

[PATCH] idr: fix missing spin_unlock()

Signed-off-by: default avatarLi Shaohua <shaohua.li@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cea2509a
......@@ -39,8 +39,10 @@ static struct idr_layer *alloc_layer(struct idr *idp)
struct idr_layer *p;
spin_lock(&idp->lock);
if (!(p = idp->id_free))
if (!(p = idp->id_free)) {
spin_unlock(&idp->lock);
return NULL;
}
idp->id_free = p->ary[0];
idp->id_free_cnt--;
p->ary[0] = NULL;
......
Markdown is supported
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