VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Jan Blunck <jblunck@infradead.org> 2010-08-15 22:51:10 +0200 committer: Arnd Bergmann <arnd@arndb.de> 2010-10-04 21:10:10 +0200 commit: db71922217a214e5c9268448e537b54fc1f301ea parent: 899611ee7d373e5eeda08e9a8632684e1ebbbf00
Commit Summary:
BKL: Explicitly add BKL around get_sb/fill_super
Diffstat:
1 file changed, 7 insertions, 1 deletion
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 34235d4bf08b..3069416fa8ef 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -382,9 +382,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
 	struct inode *root_inode;
 	int res;
 
+	lock_kernel();
+
 	sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL);
-	if (!sbi)
+	if (!sbi) {
+		unlock_kernel();
 		return -ENOMEM;
+	}
 	sb->s_fs_info = sbi;
 	INIT_HLIST_HEAD(&sbi->rsrc_inodes);
 
@@ -435,6 +439,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
 	sb->s_root->d_op = &hfs_dentry_operations;
 
 	/* everything's okay */
+	unlock_kernel();
 	return 0;
 
 bail_iput:
@@ -443,6 +448,7 @@ bail_no_root:
 	printk(KERN_ERR "hfs: get root inode failed.\n");
 bail:
 	hfs_mdb_put(sb);
+	unlock_kernel();
 	return res;
 }