Commit 7a946193 authored by Ryusuke Konishi's avatar Ryusuke Konishi Committed by Linus Torvalds

nilfs2: use unlocked_ioctl

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: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8082d36a
...@@ -702,7 +702,7 @@ struct file_operations nilfs_dir_operations = { ...@@ -702,7 +702,7 @@ struct file_operations nilfs_dir_operations = {
.llseek = generic_file_llseek, .llseek = generic_file_llseek,
.read = generic_read_dir, .read = generic_read_dir,
.readdir = nilfs_readdir, .readdir = nilfs_readdir,
.ioctl = nilfs_ioctl, .unlocked_ioctl = nilfs_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = nilfs_ioctl, .compat_ioctl = nilfs_ioctl,
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
......
...@@ -140,7 +140,7 @@ struct file_operations nilfs_file_operations = { ...@@ -140,7 +140,7 @@ struct file_operations nilfs_file_operations = {
.write = do_sync_write, .write = do_sync_write,
.aio_read = generic_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = generic_file_aio_write, .aio_write = generic_file_aio_write,
.ioctl = nilfs_ioctl, .unlocked_ioctl = nilfs_ioctl,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = nilfs_ioctl, .compat_ioctl = nilfs_ioctl,
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
......
...@@ -600,9 +600,9 @@ static int nilfs_ioctl_sync(struct inode *inode, struct file *filp, ...@@ -600,9 +600,9 @@ static int nilfs_ioctl_sync(struct inode *inode, struct file *filp,
return 0; return 0;
} }
int nilfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, long nilfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
unsigned long arg)
{ {
struct inode *inode = filp->f_dentry->d_inode;
void __user *argp = (void * __user *)arg; void __user *argp = (void * __user *)arg;
switch (cmd) { switch (cmd) {
......
...@@ -242,7 +242,7 @@ extern void nilfs_set_link(struct inode *, struct nilfs_dir_entry *, ...@@ -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); extern int nilfs_sync_file(struct file *, struct dentry *, int);
/* ioctl.c */ /* 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 *); int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *, void __user *);
/* inode.c */ /* inode.c */
......
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