aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
authorJan Blunck <jblunck@infradead.org>2010-02-24 07:25:30 -0500
committerArnd Bergmann <arnd@arndb.de>2010-10-04 15:10:39 -0400
commit8526fb37c907f8f4eb9965367af6aeec76aedbce (patch)
tree30c0432d5ee63a62bb7325d14b54b6a1267bc581 /fs/hfs
parentf2143c4e2ebc6be3f07b7c7527dae7313fde23e1 (diff)
BKL: Remove BKL from HFS
The BKL is only used in put_super and fill_super that are both protected by the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL entirely. Signed-off-by: Jan Blunck <jblunck@infradead.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/hfs')
-rw-r--r--fs/hfs/super.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 3069416fa8ef..33254160f650 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -20,7 +20,6 @@
20#include <linux/parser.h> 20#include <linux/parser.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/smp_lock.h>
24#include <linux/vfs.h> 23#include <linux/vfs.h>
25 24
26#include "hfs_fs.h" 25#include "hfs_fs.h"
@@ -79,15 +78,11 @@ static int hfs_sync_fs(struct super_block *sb, int wait)
79 */ 78 */
80static void hfs_put_super(struct super_block *sb) 79static void hfs_put_super(struct super_block *sb)
81{ 80{
82 lock_kernel();
83
84 if (sb->s_dirt) 81 if (sb->s_dirt)
85 hfs_write_super(sb); 82 hfs_write_super(sb);
86 hfs_mdb_close(sb); 83 hfs_mdb_close(sb);
87 /* release the MDB's resources */ 84 /* release the MDB's resources */
88 hfs_mdb_put(sb); 85 hfs_mdb_put(sb);
89
90 unlock_kernel();
91} 86}
92 87
93/* 88/*
@@ -382,13 +377,10 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
382 struct inode *root_inode; 377 struct inode *root_inode;
383 int res; 378 int res;
384 379
385 lock_kernel();
386
387 sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); 380 sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL);
388 if (!sbi) { 381 if (!sbi)
389 unlock_kernel();
390 return -ENOMEM; 382 return -ENOMEM;
391 } 383
392 sb->s_fs_info = sbi; 384 sb->s_fs_info = sbi;
393 INIT_HLIST_HEAD(&sbi->rsrc_inodes); 385 INIT_HLIST_HEAD(&sbi->rsrc_inodes);
394 386
@@ -439,7 +431,6 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
439 sb->s_root->d_op = &hfs_dentry_operations; 431 sb->s_root->d_op = &hfs_dentry_operations;
440 432
441 /* everything's okay */ 433 /* everything's okay */
442 unlock_kernel();
443 return 0; 434 return 0;
444 435
445bail_iput: 436bail_iput:
@@ -448,7 +439,6 @@ bail_no_root:
448 printk(KERN_ERR "hfs: get root inode failed.\n"); 439 printk(KERN_ERR "hfs: get root inode failed.\n");
449bail: 440bail:
450 hfs_mdb_put(sb); 441 hfs_mdb_put(sb);
451 unlock_kernel();
452 return res; 442 return res;
453} 443}
454 444