From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Tyler Hicks <tyhicks@linux.vnet.ibm.com>,
Dustin Kirkland <kirkland@canonical.com>,
Ecryptfs <ecryptfs-devel@lists.launchpad.net>,
Thomas Gleixner <tglx@linutronix.de>,
John Kacur <jkacur@redhat.com>, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 1/8] ecryptfs: Pushdown the bkl from ioctl
Date: Wed, 19 May 2010 19:24:08 +0200 [thread overview]
Message-ID: <1274289855-10001-2-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1274289855-10001-1-git-send-regression-fweisbec@gmail.com>
Pushdown the bkl to ecryptfs_ioctl.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Ecryptfs <ecryptfs-devel@lists.launchpad.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
fs/ecryptfs/file.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index e7440a6..9352613 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -294,12 +294,12 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
return rc;
}
-static int ecryptfs_ioctl(struct inode *inode, struct file *file,
+static long ecryptfs_ioctl(struct file *file,
unsigned int cmd, unsigned long arg);
const struct file_operations ecryptfs_dir_fops = {
.readdir = ecryptfs_readdir,
- .ioctl = ecryptfs_ioctl,
+ .unlocked_ioctl = ecryptfs_ioctl,
.open = ecryptfs_open,
.flush = ecryptfs_flush,
.release = ecryptfs_release,
@@ -315,7 +315,7 @@ const struct file_operations ecryptfs_main_fops = {
.write = do_sync_write,
.aio_write = generic_file_aio_write,
.readdir = ecryptfs_readdir,
- .ioctl = ecryptfs_ioctl,
+ .unlocked_ioctl = ecryptfs_ioctl,
.mmap = generic_file_mmap,
.open = ecryptfs_open,
.flush = ecryptfs_flush,
@@ -326,8 +326,8 @@ const struct file_operations ecryptfs_main_fops = {
};
static int
-ecryptfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
- unsigned long arg)
+ecryptfs_ioctl_unlocked(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
{
int rc = 0;
struct file *lower_file = NULL;
@@ -341,3 +341,16 @@ ecryptfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
rc = -ENOTTY;
return rc;
}
+
+static long ecryptfs_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ long ret;
+ struct inode *inode = file->f_dentry->d_inode;
+
+ lock_kernel();
+ ret = ecryptfs_ioctl_unlocked(inode, file, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}
--
1.6.2.3
next prev parent reply other threads:[~2010-05-19 17:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 17:24 [PATCH 0/8] Another set of ioctl bkl pushdown, almost the end Frederic Weisbecker
2010-05-19 17:24 ` Frederic Weisbecker [this message]
2010-05-20 23:39 ` [PATCH 1/8] ecryptfs: Pushdown the bkl from ioctl Tyler Hicks
2010-05-20 23:42 ` [PATCH] vfs/eCryptfs: Handle ioctl calls with unlocked and compat functions Tyler Hicks
2010-05-21 6:25 ` Arnd Bergmann
2010-05-21 7:03 ` Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 2/8] autofs: Pushdown the bkl from ioctl Frederic Weisbecker
2010-05-19 18:02 ` H. Peter Anvin
2010-05-19 18:08 ` Frederic Weisbecker
2010-05-19 18:13 ` H. Peter Anvin
2010-05-19 18:22 ` Frederic Weisbecker
2010-05-19 19:03 ` Frederic Weisbecker
2010-05-19 20:04 ` H. Peter Anvin
2010-05-20 11:35 ` Ian Kent
2010-05-19 17:24 ` [PATCH 3/8] autofs4: " Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 4/8] sunrpc: " Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 5/8] sunrpc: Pushdown the bkl from sunrpc cache ioctl Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 6/8] uml: Pushdown the bkl from harddog_kern ioctl Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 7/8] cris: Pushdown the bkl from ioctl Frederic Weisbecker
2010-05-19 17:24 ` [PATCH 8/8] ia64: Use unlocked_ioctl from perfmon Frederic Weisbecker
2010-05-20 11:26 ` [PATCH 0/8] Another set of ioctl bkl pushdown, almost the end Jan Kara
2010-05-20 11:28 ` Frederic Weisbecker
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=1274289855-10001-2-git-send-regression-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=arnd@arndb.de \
--cc=ecryptfs-devel@lists.launchpad.net \
--cc=jkacur@redhat.com \
--cc=kirkland@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).