cuse: use mutex as registration lock instead of spinlocks
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 17 Nov 2012 11:45:47 +0000 (12:45 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 17 Jan 2013 12:04:51 +0000 (13:04 +0100)
commit8ce03fd76d323526a693d05d85296ef07a387a9f
treeb1370c17b55e60dfc8faa8b6a8dae2b394199ce9
parentdfdebc24837ed0a1d6ad73b108a10d3c88d1b6e8
cuse: use mutex as registration lock instead of spinlocks

We need to check for name-collisions during cuse-device registration. To
avoid race-conditions, this needs to be protected during the whole device
registration. Therefore, replace the spinlocks by mutexes first so we can
safely extend the locked regions to include more expensive or sleeping
code paths.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/cuse.c