[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1257156307-24175-20-git-send-email-jblunck@suse.de>
Date: Mon, 2 Nov 2009 11:04:59 +0100
From: Jan Blunck <jblunck@...e.de>
To: linux-fsdevel@...r.kernel.org
Cc: Matthew Wilcox <matthew@....cx>, linux-kernel@...r.kernel.org,
Jan Blunck <jblunck@...e.de>,
William Irwin <wli@...omorphy.com>,
Andrew Morton <akpm@...ux-foundation.org>,
James Morris <jmorris@...ei.org>, Mel Gorman <mel@....ul.ie>,
David Howells <dhowells@...hat.com>,
Serge Hallyn <serue@...ibm.com>
Subject: [PATCH 19/27] BKL: Remove BKL from hugetlbfs
BKL is only used in fill_super. It is safe to remove it.
Signed-off-by: Jan Blunck <jblunck@...e.de>
---
fs/hugetlbfs/inode.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 53be2b9..87a1258 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -32,7 +32,6 @@
#include <linux/security.h>
#include <linux/ima.h>
#include <linux/magic.h>
-#include <linux/smp_lock.h> /* Only for lock_kernel() */
#include <asm/uaccess.h>
@@ -825,7 +824,6 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
struct hugetlbfs_config config;
struct hugetlbfs_sb_info *sbinfo;
- lock_kernel();
save_mount_options(sb, data);
config.nr_blocks = -1; /* No limit on size by default */
@@ -835,16 +833,12 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
config.mode = 0755;
config.hstate = &default_hstate;
ret = hugetlbfs_parse_options(data, &config);
- if (ret) {
- unlock_kernel();
+ if (ret)
return ret;
- }
sbinfo = kmalloc(sizeof(struct hugetlbfs_sb_info), GFP_KERNEL);
- if (!sbinfo) {
- unlock_kernel();
+ if (!sbinfo)
return -ENOMEM;
- }
sb->s_fs_info = sbinfo;
sbinfo->hstate = config.hstate;
spin_lock_init(&sbinfo->stat_lock);
@@ -869,11 +863,9 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
goto out_free;
}
sb->s_root = root;
- unlock_kernel();
return 0;
out_free:
kfree(sbinfo);
- unlock_kernel();
return -ENOMEM;
}
--
1.6.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists