mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	Dustin Kirkland <kirkland@canonical.com>,
	Tyler Hicks <tyhicks@linux.vnet.ibm.com>,
	ecryptfs-devel@lists.launchpad.net
Subject: [PATCH 09/12] BKL: Remove BKL from ecryptfs
Date: Thu, 16 Sep 2010 19:46:22 +0200	[thread overview]
Message-ID: <1284659185-8942-10-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1284659185-8942-1-git-send-email-arnd@arndb.de>

The BKL is only used in fill_super, which is protected by the superblocks
s_umount rw_semaphorei, and in fasync, which does not do anything that
could require the BKL. Therefore it is safe to remove the BKL entirely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: ecryptfs-devel@lists.launchpad.net
---
 fs/ecryptfs/file.c |    3 ---
 fs/ecryptfs/main.c |    4 ----
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index 622c951..2b9a644 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -31,7 +31,6 @@
 #include <linux/security.h>
 #include <linux/compat.h>
 #include <linux/fs_stack.h>
-#include <linux/smp_lock.h>
 #include "ecryptfs_kernel.h"
 
 /**
@@ -284,11 +283,9 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
 	int rc = 0;
 	struct file *lower_file = NULL;
 
-	lock_kernel();
 	lower_file = ecryptfs_file_to_lower(file);
 	if (lower_file->f_op && lower_file->f_op->fasync)
 		rc = lower_file->f_op->fasync(fd, lower_file, flag);
-	unlock_kernel();
 	return rc;
 }
 
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index c4af92f..cbd4e18 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -36,7 +36,6 @@
 #include <linux/parser.h>
 #include <linux/fs_stack.h>
 #include <linux/slab.h>
-#include <linux/smp_lock.h>     /* For lock_kernel() */
 #include "ecryptfs_kernel.h"
 
 /**
@@ -551,7 +550,6 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
 	const char *err = "Getting sb failed";
 	int rc;
 
-	lock_kernel();
 	sbi = kmem_cache_zalloc(ecryptfs_sb_info_cache, GFP_KERNEL);
 	if (!sbi) {
 		rc = -ENOMEM;
@@ -610,7 +608,6 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
 		goto out;
 	}
 	simple_set_mnt(mnt, s);
-	unlock_kernel();
 	return 0;
 
 out:
@@ -619,7 +616,6 @@ out:
 		kmem_cache_free(ecryptfs_sb_info_cache, sbi);
 	}
 	printk(KERN_ERR "%s; rc = [%d]\n", err, rc);
-	unlock_kernel();
 	return rc;
 }
 
-- 
1.7.1


  parent reply	other threads:[~2010-09-16 17:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 17:46 [PATCH 00/12] more BKL removal after get_sb pushdown Arnd Bergmann
2010-09-16 17:46 ` [PATCH 01/12] BKL: Remove BKL from usbfs Arnd Bergmann
2010-09-16 18:47   ` Greg KH
2010-09-16 17:46 ` [PATCH 02/12] BKL: Remove BKL from fat Arnd Bergmann
2010-09-16 17:46 ` [PATCH 03/12] BKL: Remove BKL from isofs Arnd Bergmann
2010-09-16 17:46 ` [PATCH 04/12] BKL: Remove BKL from autofs4 Arnd Bergmann
2010-09-16 17:49   ` H. Peter Anvin
2010-09-16 17:55     ` Arnd Bergmann
2010-09-16 19:20       ` H. Peter Anvin
2010-09-17  1:31         ` Ian Kent
2010-09-17  1:33       ` Ian Kent
2010-09-17  7:17         ` Arnd Bergmann
2010-09-17 17:01           ` Greg KH
2010-09-16 17:46 ` [PATCH 05/12] BKL: Remove BKL from ReiserFS Arnd Bergmann
2010-09-16 17:46 ` [PATCH 06/12] BKL: Remove BKL from capifs Arnd Bergmann
2010-09-17 23:35   ` David Miller
2010-09-18  7:55     ` Arnd Bergmann
2010-09-16 17:46 ` [PATCH 07/12] BKL: Remove BKL from USB gadgetfs Arnd Bergmann
2010-09-16 17:46 ` [PATCH 08/12] BKL: Remove BKL from afs Arnd Bergmann
2010-09-16 17:46 ` Arnd Bergmann [this message]
2010-09-16 17:46 ` [PATCH 10/12] BKL: Remove BKL from jffs2 Arnd Bergmann
2010-09-16 17:46 ` [PATCH 11/12] BKL: Remove BKL from squashfs Arnd Bergmann
2010-09-16 17:46 ` [PATCH 12/12] BKL: Remove BKL from OCFS2 Arnd Bergmann
2010-09-16 22:26   ` Mark Fasheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284659185-8942-10-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ecryptfs-devel@lists.launchpad.net \
    --cc=kirkland@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tyhicks@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®