aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-09-16 09:35:54 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-04 15:10:50 -0400
commit3dbc4b32d0b39701cbec65582e196a20889155fb (patch)
treef2ce90d3850a37f1e6cbb9ed556b1535d62e80cb /fs/squashfs
parent1a028dd2dd589c3924d9711a1b073a13c820b6b5 (diff)
BKL: Remove BKL from squashfs
The BKL is only used in put_super and fill_super, which are both protected by the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL entirely. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Diffstat (limited to 'fs/squashfs')
-rw-r--r--fs/squashfs/super.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index ab1a401a0e19..07a4f1156048 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -30,7 +30,6 @@
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/vfs.h> 31#include <linux/vfs.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/smp_lock.h>
34#include <linux/mutex.h> 33#include <linux/mutex.h>
35#include <linux/pagemap.h> 34#include <linux/pagemap.h>
36#include <linux/init.h> 35#include <linux/init.h>
@@ -87,14 +86,11 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
87 u64 lookup_table_start, xattr_id_table_start; 86 u64 lookup_table_start, xattr_id_table_start;
88 int err; 87 int err;
89 88
90 lock_kernel();
91
92 TRACE("Entered squashfs_fill_superblock\n"); 89 TRACE("Entered squashfs_fill_superblock\n");
93 90
94 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); 91 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL);
95 if (sb->s_fs_info == NULL) { 92 if (sb->s_fs_info == NULL) {
96 ERROR("Failed to allocate squashfs_sb_info\n"); 93 ERROR("Failed to allocate squashfs_sb_info\n");
97 unlock_kernel();
98 return -ENOMEM; 94 return -ENOMEM;
99 } 95 }
100 msblk = sb->s_fs_info; 96 msblk = sb->s_fs_info;
@@ -304,7 +300,6 @@ allocate_root:
304 300
305 TRACE("Leaving squashfs_fill_super\n"); 301 TRACE("Leaving squashfs_fill_super\n");
306 kfree(sblk); 302 kfree(sblk);
307 unlock_kernel();
308 return 0; 303 return 0;
309 304
310failed_mount: 305failed_mount:
@@ -319,13 +314,11 @@ failed_mount:
319 kfree(sb->s_fs_info); 314 kfree(sb->s_fs_info);
320 sb->s_fs_info = NULL; 315 sb->s_fs_info = NULL;
321 kfree(sblk); 316 kfree(sblk);
322 unlock_kernel();
323 return err; 317 return err;
324 318
325failure: 319failure:
326 kfree(sb->s_fs_info); 320 kfree(sb->s_fs_info);
327 sb->s_fs_info = NULL; 321 sb->s_fs_info = NULL;
328 unlock_kernel();
329 return -ENOMEM; 322 return -ENOMEM;
330} 323}
331 324
@@ -360,8 +353,6 @@ static int squashfs_remount(struct super_block *sb, int *flags, char *data)
360 353
361static void squashfs_put_super(struct super_block *sb) 354static void squashfs_put_super(struct super_block *sb)
362{ 355{
363 lock_kernel();
364
365 if (sb->s_fs_info) { 356 if (sb->s_fs_info) {
366 struct squashfs_sb_info *sbi = sb->s_fs_info; 357 struct squashfs_sb_info *sbi = sb->s_fs_info;
367 squashfs_cache_delete(sbi->block_cache); 358 squashfs_cache_delete(sbi->block_cache);
@@ -376,8 +367,6 @@ static void squashfs_put_super(struct super_block *sb)
376 kfree(sb->s_fs_info); 367 kfree(sb->s_fs_info);
377 sb->s_fs_info = NULL; 368 sb->s_fs_info = NULL;
378 } 369 }
379
380 unlock_kernel();
381} 370}
382 371
383 372