aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/util.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-01-24 04:14:12 -0500
committerArnd Bergmann <arnd@arndb.de>2011-03-02 16:27:48 -0500
commit788257d6101d986ac8f2741aaa35974af47f574c (patch)
tree332d877e09d8b5de6a4bdfba8111dd04e84a722b /fs/ufs/util.c
parent9a311b96c3065f362e3348cb5d7af1a57ca6bff9 (diff)
ufs: remove the BKL
This introduces a new per-superblock mutex in UFS to replace the big kernel lock. I have been careful to avoid nested calls to lock_ufs and to get the lock order right with respect to other mutexes, in particular lock_super. I did not make any attempt to prove that the big kernel lock is not needed in a particular place in the code, which is very possible. The mutex has a significant performance impact, so it is only used on SMP or PREEMPT configurations. As Nick Piggin noticed, any allocation inside of the lock may end up deadlocking when we get to ufs_getfrag_block in the reclaim task, so we now use GFP_NOFS. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Nick Bowler <nbowler@elliptictech.com> Cc: Evgeniy Dushistov <dushistov@mail.ru> Cc: Nick Piggin <npiggin@gmail.com>
Diffstat (limited to 'fs/ufs/util.c')
-rw-r--r--fs/ufs/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/util.c b/fs/ufs/util.c
index d2c36d53fe66..95425b59ce0a 100644
--- a/fs/ufs/util.c
+++ b/fs/ufs/util.c
@@ -27,7 +27,7 @@ struct ufs_buffer_head * _ubh_bread_ (struct ufs_sb_private_info * uspi,
27 if (count > UFS_MAXFRAG) 27 if (count > UFS_MAXFRAG)
28 return NULL; 28 return NULL;
29 ubh = (struct ufs_buffer_head *) 29 ubh = (struct ufs_buffer_head *)
30 kmalloc (sizeof (struct ufs_buffer_head), GFP_KERNEL); 30 kmalloc (sizeof (struct ufs_buffer_head), GFP_NOFS);
31 if (!ubh) 31 if (!ubh)
32 return NULL; 32 return NULL;
33 ubh->fragment = fragment; 33 ubh->fragment = fragment;