diff options
author | Li Shaohua <shaohua.li@intel.com> | 2004-09-22 04:19:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-22 04:19:07 -0700 |
commit | e550107bc77fb24c3fc0f2b08f643edf892c6407 (patch) | |
tree | d41a4a4b296a3f4c40f2fbd1cd3ee3eee44fee22 /lib | |
parent | cea2509a17eac11ca4a40088a6087988ca70c435 (diff) | |
download | history-e550107bc77fb24c3fc0f2b08f643edf892c6407.tar.gz |
[PATCH] idr: fix missing spin_unlock()
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/idr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/idr.c b/lib/idr.c index e260da2839fb3c..972eefcce2b3a9 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -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; |