From 81aa22f458eb87a2a164266672b0b7fc6744f0f6 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 27 Jan 2008 03:17:17 +0100 Subject: [PATCH] --- yaml --- r: 89597 b: refs/heads/master c: c9ec14884d69a303eef4faae42bd3c4e25b19941 h: refs/heads/master i: 89595: 88b43aff6e3c021280ae5181c713c27198a6a7f3 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/file.c | 4 ++-- trunk/fs/ocfs2/ioctl.c | 12 +++--------- trunk/fs/ocfs2/ioctl.h | 3 +-- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 6bc9e06bc69f..c95a1fae73f7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5dabd69515765156605b09261abf969236a77803 +refs/heads/master: c9ec14884d69a303eef4faae42bd3c4e25b19941 diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index ed5d5232e85d..9154c82d3258 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -2242,7 +2242,7 @@ const struct file_operations ocfs2_fops = { .open = ocfs2_file_open, .aio_read = ocfs2_file_aio_read, .aio_write = ocfs2_file_aio_write, - .ioctl = ocfs2_ioctl, + .unlocked_ioctl = ocfs2_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = ocfs2_compat_ioctl, #endif @@ -2258,7 +2258,7 @@ const struct file_operations ocfs2_dops = { .fsync = ocfs2_sync_file, .release = ocfs2_dir_release, .open = ocfs2_dir_open, - .ioctl = ocfs2_ioctl, + .unlocked_ioctl = ocfs2_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = ocfs2_compat_ioctl, #endif diff --git a/trunk/fs/ocfs2/ioctl.c b/trunk/fs/ocfs2/ioctl.c index ab1c2167d7f4..b413166dd163 100644 --- a/trunk/fs/ocfs2/ioctl.c +++ b/trunk/fs/ocfs2/ioctl.c @@ -113,9 +113,9 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, return status; } -int ocfs2_ioctl(struct inode * inode, struct file * filp, - unsigned int cmd, unsigned long arg) +long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { + struct inode *inode = filp->f_path.dentry->d_inode; unsigned int flags; int new_clusters; int status; @@ -169,9 +169,6 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp, #ifdef CONFIG_COMPAT long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) { - struct inode *inode = file->f_path.dentry->d_inode; - int ret; - switch (cmd) { case OCFS2_IOC32_GETFLAGS: cmd = OCFS2_IOC_GETFLAGS; @@ -191,9 +188,6 @@ long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) return -ENOIOCTLCMD; } - lock_kernel(); - ret = ocfs2_ioctl(inode, file, cmd, arg); - unlock_kernel(); - return ret; + return ocfs2_ioctl(file, cmd, arg); } #endif diff --git a/trunk/fs/ocfs2/ioctl.h b/trunk/fs/ocfs2/ioctl.h index 4d6c4f430d0d..cf9a5ee30fef 100644 --- a/trunk/fs/ocfs2/ioctl.h +++ b/trunk/fs/ocfs2/ioctl.h @@ -10,8 +10,7 @@ #ifndef OCFS2_IOCTL_H #define OCFS2_IOCTL_H -int ocfs2_ioctl(struct inode * inode, struct file * filp, - unsigned int cmd, unsigned long arg); +long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg); #endif /* OCFS2_IOCTL_H */