]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nilfs2: use unlocked_ioctl
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tue, 7 Apr 2009 02:01:53 +0000 (19:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 15:31:19 +0000 (08:31 -0700)
Pekka Enberg suggested converting ->ioctl operations to use
->unlocked_ioctl to avoid BKL.

The conversion was verified to be safe, so I will take it on this
occasion.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nilfs2/dir.c
fs/nilfs2/file.c
fs/nilfs2/ioctl.c
fs/nilfs2/nilfs.h

index 393316cd3cadcd931dec768945680ea2e9bdf8b7..54100acc1102706ed6c39116b89f7fbaa6c72f02 100644 (file)
@@ -702,7 +702,7 @@ struct file_operations nilfs_dir_operations = {
        .llseek         = generic_file_llseek,
        .read           = generic_read_dir,
        .readdir        = nilfs_readdir,
-       .ioctl          = nilfs_ioctl,
+       .unlocked_ioctl = nilfs_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = nilfs_ioctl,
 #endif /* CONFIG_COMPAT */
index a2bd962ebd859d7dfa59b4ce8fae33ce31390609..6bd84a0d82385cf26e6bc8194dfe5340d73d149a 100644 (file)
@@ -140,7 +140,7 @@ struct file_operations nilfs_file_operations = {
        .write          = do_sync_write,
        .aio_read       = generic_file_aio_read,
        .aio_write      = generic_file_aio_write,
-       .ioctl          = nilfs_ioctl,
+       .unlocked_ioctl = nilfs_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = nilfs_ioctl,
 #endif /* CONFIG_COMPAT */
index 33aff8842ce9c196bd482b152287e8a78f561b9e..cfb27892ffe86c16ad4904d80c1e1476ffd1abcb 100644 (file)
@@ -600,9 +600,9 @@ static int nilfs_ioctl_sync(struct inode *inode, struct file *filp,
        return 0;
 }
 
-int nilfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-               unsigned long arg)
+long nilfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
+       struct inode *inode = filp->f_dentry->d_inode;
        void __user *argp = (void * __user *)arg;
 
        switch (cmd) {
index f767644a72420f0c9eb16cd9c988785e5a55d18c..d08fb1ce50125bd5862951049862ad3e446f560e 100644 (file)
@@ -242,7 +242,7 @@ extern void nilfs_set_link(struct inode *, struct nilfs_dir_entry *,
 extern int nilfs_sync_file(struct file *, struct dentry *, int);
 
 /* ioctl.c */
-int nilfs_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
+long nilfs_ioctl(struct file *, unsigned int, unsigned long);
 int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *, void __user *);
 
 /* inode.c */