Commit c9ec1488 authored by Andi Kleen's avatar Andi Kleen Committed by Mark Fasheh

ocfs2: Convert ocfs2 over to unlocked_ioctl

As far as I can see there is nothing in ocfs2_ioctl that requires the BKL,
so use unlocked_ioctl
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 5dabd695
...@@ -2242,7 +2242,7 @@ const struct file_operations ocfs2_fops = { ...@@ -2242,7 +2242,7 @@ const struct file_operations ocfs2_fops = {
.open = ocfs2_file_open, .open = ocfs2_file_open,
.aio_read = ocfs2_file_aio_read, .aio_read = ocfs2_file_aio_read,
.aio_write = ocfs2_file_aio_write, .aio_write = ocfs2_file_aio_write,
.ioctl = ocfs2_ioctl, .unlocked_ioctl = ocfs2_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = ocfs2_compat_ioctl, .compat_ioctl = ocfs2_compat_ioctl,
#endif #endif
...@@ -2258,7 +2258,7 @@ const struct file_operations ocfs2_dops = { ...@@ -2258,7 +2258,7 @@ const struct file_operations ocfs2_dops = {
.fsync = ocfs2_sync_file, .fsync = ocfs2_sync_file,
.release = ocfs2_dir_release, .release = ocfs2_dir_release,
.open = ocfs2_dir_open, .open = ocfs2_dir_open,
.ioctl = ocfs2_ioctl, .unlocked_ioctl = ocfs2_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = ocfs2_compat_ioctl, .compat_ioctl = ocfs2_compat_ioctl,
#endif #endif
......
...@@ -113,9 +113,9 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, ...@@ -113,9 +113,9 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,
return status; return status;
} }
int ocfs2_ioctl(struct inode * inode, struct file * filp, long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{ {
struct inode *inode = filp->f_path.dentry->d_inode;
unsigned int flags; unsigned int flags;
int new_clusters; int new_clusters;
int status; int status;
...@@ -169,9 +169,6 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp, ...@@ -169,9 +169,6 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) 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) { switch (cmd) {
case OCFS2_IOC32_GETFLAGS: case OCFS2_IOC32_GETFLAGS:
cmd = OCFS2_IOC_GETFLAGS; cmd = OCFS2_IOC_GETFLAGS;
...@@ -191,9 +188,6 @@ long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) ...@@ -191,9 +188,6 @@ long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
lock_kernel(); return ocfs2_ioctl(file, cmd, arg);
ret = ocfs2_ioctl(inode, file, cmd, arg);
unlock_kernel();
return ret;
} }
#endif #endif
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
#ifndef OCFS2_IOCTL_H #ifndef OCFS2_IOCTL_H
#define OCFS2_IOCTL_H #define OCFS2_IOCTL_H
int ocfs2_ioctl(struct inode * inode, struct file * filp, long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
unsigned int cmd, unsigned long arg);
long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg); long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg);
#endif /* OCFS2_IOCTL_H */ #endif /* OCFS2_IOCTL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment