From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH 19/27] BKL: Remove BKL from hugetlbfs Date: Mon, 2 Nov 2009 11:04:59 +0100 Message-ID: <1257156307-24175-20-git-send-email-jblunck@suse.de> References: <1257156307-24175-1-git-send-email-jblunck@suse.de> Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, Jan Blunck , William Irwin , Andrew Morton , James Morris , Mel Gorman , David Howells , Serge Hallyn To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor.suse.de ([195.135.220.2]:47312 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754465AbZKBKHI (ORCPT ); Mon, 2 Nov 2009 05:07:08 -0500 In-Reply-To: <1257156307-24175-1-git-send-email-jblunck@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: BKL is only used in fill_super. It is safe to remove it. Signed-off-by: Jan Blunck --- 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 #include #include -#include /* Only for lock_kernel() */ #include @@ -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