]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ufs: sb mutex merge + mutex_destroy
authorFabian Frederick <fabf@skynet.be>
Thu, 24 Apr 2014 23:04:02 +0000 (09:04 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Apr 2014 05:42:58 +0000 (15:42 +1000)
commitd7c55a50fabcccfb9a902973232e30b7c0bcb8c4
treed4312665d5a3beb090064016ea3789378a29f576
parent0e77e9b3a452144ffdf65253772f96ef8de8bd9a
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