Commit c9ec14884d69a303eef4faae42bd3c4e25b19941

Authored by Andi Kleen
Committed by Mark Fasheh
1 parent 5dabd69515

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: Andi Kleen <ak@suse.de>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>

Showing 3 changed files with 6 additions and 13 deletions Side-by-side Diff

... ... @@ -2242,7 +2242,7 @@
2242 2242 .open = ocfs2_file_open,
2243 2243 .aio_read = ocfs2_file_aio_read,
2244 2244 .aio_write = ocfs2_file_aio_write,
2245   - .ioctl = ocfs2_ioctl,
  2245 + .unlocked_ioctl = ocfs2_ioctl,
2246 2246 #ifdef CONFIG_COMPAT
2247 2247 .compat_ioctl = ocfs2_compat_ioctl,
2248 2248 #endif
... ... @@ -2258,7 +2258,7 @@
2258 2258 .fsync = ocfs2_sync_file,
2259 2259 .release = ocfs2_dir_release,
2260 2260 .open = ocfs2_dir_open,
2261   - .ioctl = ocfs2_ioctl,
  2261 + .unlocked_ioctl = ocfs2_ioctl,
2262 2262 #ifdef CONFIG_COMPAT
2263 2263 .compat_ioctl = ocfs2_compat_ioctl,
2264 2264 #endif
... ... @@ -113,9 +113,9 @@
113 113 return status;
114 114 }
115 115  
116   -int ocfs2_ioctl(struct inode * inode, struct file * filp,
117   - unsigned int cmd, unsigned long arg)
  116 +long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
118 117 {
  118 + struct inode *inode = filp->f_path.dentry->d_inode;
119 119 unsigned int flags;
120 120 int new_clusters;
121 121 int status;
... ... @@ -169,9 +169,6 @@
169 169 #ifdef CONFIG_COMPAT
170 170 long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
171 171 {
172   - struct inode *inode = file->f_path.dentry->d_inode;
173   - int ret;
174   -
175 172 switch (cmd) {
176 173 case OCFS2_IOC32_GETFLAGS:
177 174 cmd = OCFS2_IOC_GETFLAGS;
... ... @@ -191,10 +188,7 @@
191 188 return -ENOIOCTLCMD;
192 189 }
193 190  
194   - lock_kernel();
195   - ret = ocfs2_ioctl(inode, file, cmd, arg);
196   - unlock_kernel();
197   - return ret;
  191 + return ocfs2_ioctl(file, cmd, arg);
198 192 }
199 193 #endif
... ... @@ -10,8 +10,7 @@
10 10 #ifndef OCFS2_IOCTL_H
11 11 #define OCFS2_IOCTL_H
12 12  
13   -int ocfs2_ioctl(struct inode * inode, struct file * filp,
14   - unsigned int cmd, unsigned long arg);
  13 +long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
15 14 long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg);
16 15  
17 16 #endif /* OCFS2_IOCTL_H */