devtmpfs: Convert dirlock to a mutex
authorThomas Gleixner <tglx@linutronix.de>
Wed, 16 Dec 2009 21:31:33 +0000 (21:31 +0000)
committerMatt Sealey <matt@genesi-usa.com>
Fri, 27 Aug 2010 21:49:59 +0000 (16:49 -0500)
commitccd366ff9f5c524b49825cdabe4e1b0fd6fb3315
tree339173fa459e0acf4c214b54635d08a94c843bf7
parent7e7842a806a176a0fb175859e0c89a16711c3cfb
devtmpfs: Convert dirlock to a mutex

devtmpfs has a rw_lock dirlock which serializes delete_path and
create_path.

This code was obviously never tested with the usual set of debugging
facilities enabled. In the dirlock held sections the code calls:

 - vfs functions which take mutexes
 - kmalloc(, GFP_KERNEL)

In both code pathes the might sleep warning triggers and spams dmesg.

Convert the rw_lock to a mutex. There is no reason why this needs to
be a rwlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/devtmpfs.c