]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] uml ubd driver: change ubd_lock to be a mutex
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Tue, 31 Oct 2006 06:07:07 +0000 (22:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 31 Oct 2006 16:06:59 +0000 (08:06 -0800)
commit547066ac015e84612bb7db6e4305b51a3245faf0
treeade46df79306ba0c5bea3449fe9a8ef66d25129b
parentf739d93b256c90c4f3dd1cfb98eaad7d4eb64a6b
[PATCH] uml ubd driver: change ubd_lock to be a mutex

This lock protects ubd setup and teardown, so is only used in process context;
beyond that, during such setup memory allocations must be performed and some
generic functions which can sleep must be called (such as add_disk()).  So the
only correct solution is to make it a mutex instead of a spin_lock.  No other
change is done - this lock must be acquired in different places but it's done
afterwards.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/ubd_kern.c