]> git.baikalelectronics.ru Git - kernel.git/commit
9p: Convert semaphore to spinlock for p9_idpool
authorAnthony Liguori <aliguori@us.ibm.com>
Thu, 7 Feb 2008 01:25:04 +0000 (19:25 -0600)
committerEric Van Hensbergen <ericvh@opteron.homeip.net>
Thu, 7 Feb 2008 01:25:04 +0000 (19:25 -0600)
commite728b0f448b47500a1eae60ed21b19c566b28290
tree9792ffca08225d8b1b19c250c33dd2b74441698f
parente7e19e5c9437ce12c23bd5a28c78daecd0c52418
9p: Convert semaphore to spinlock for p9_idpool

When booting from v9fs, down_interruptible in p9_idpool_get() triggered a BUG
as it was being called with IRQs disabled.  A spinlock seems like the right
thing to be using since the idr functions go out of their way not to sleep.

This patch eliminates the BUG by converting the semaphore to a spinlock.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/util.c