]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ufs: sb mutex merge + mutex_destroy
authorFabian Frederick <fabf@skynet.be>
Sat, 17 May 2014 13:19:33 +0000 (23:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 May 2014 07:11:42 +0000 (17:11 +1000)
commit27faee6f22506c43020791dfcd7f17a2da21f6b0
tree1d401061d379595dcdc08eb0b8d7c244487bf94d
parent0a4e0d1c9db504b441dac87a3568808a3155c41d
ufs: sb mutex merge + mutex_destroy

788257d6101d9 ("ufs: remove the BKL") replaced BKL with mutex protection
using functions lock_ufs, unlock_ufs and struct mutex 'mutex' in sb_info.

b6963327e052 ("ufs: drop lock/unlock super") removed lock/unlock super and
added struct mutex 's_lock' in sb_info.

Those 2 mutexes are generally locked/unlocked at the same time except in
allocation (balloc, ialloc).

This patch merges the 2 mutexes and propagates first commit solution.  It
also adds mutex destruction before kfree during ufs_fill_super failure and
ufs_put_super.

[akpm@linux-foundation.org: avoid ifdefs, return -EROFS not -EINVAL]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: "Chen, Jet" <jet.chen@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ufs/balloc.c
fs/ufs/ialloc.c
fs/ufs/super.c
fs/ufs/ufs.h