]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ocfs2: Convert ocfs2 over to unlocked_ioctl
authorAndi Kleen <ak@suse.de>
Sun, 27 Jan 2008 02:17:17 +0000 (03:17 +0100)
committerMark Fasheh <mfasheh@suse.com>
Fri, 18 Apr 2008 15:56:11 +0000 (08:56 -0700)
As far as I can see there is nothing in ocfs2_ioctl that requires the BKL,
so use unlocked_ioctl

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/file.c
fs/ocfs2/ioctl.c
fs/ocfs2/ioctl.h

index ed5d5232e85d9cef09b0d7f312d5a11ee8bd7426..9154c82d3258e5afc4b88fde94ecc68fc0aa91e2 100644 (file)
@@ -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
index ab1c2167d7f40552c464a06e65298f36a8bf0a04..b413166dd16340c0a159abbbf24efdd71d69ad2c 100644 (file)
@@ -113,9 +113,9 @@ bail:
        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
index 4d6c4f430d0d14e174bf89c490128014421c14f4..cf9a5ee30fefb718369e83b761bbce9bafe3dc90 100644 (file)
@@ -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 */