diff options
Diffstat (limited to 'fs/autofs4/root.c')
| -rw-r--r-- | fs/autofs4/root.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index d5c1401f0031..d34896cfb19f 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
| @@ -980,19 +980,11 @@ static int autofs4_root_ioctl_unlocked(struct inode *inode, struct file *filp, | |||
| 980 | } | 980 | } |
| 981 | } | 981 | } |
| 982 | 982 | ||
| 983 | static DEFINE_MUTEX(autofs4_ioctl_mutex); | ||
| 984 | |||
| 985 | static long autofs4_root_ioctl(struct file *filp, | 983 | static long autofs4_root_ioctl(struct file *filp, |
| 986 | unsigned int cmd, unsigned long arg) | 984 | unsigned int cmd, unsigned long arg) |
| 987 | { | 985 | { |
| 988 | long ret; | ||
| 989 | struct inode *inode = filp->f_dentry->d_inode; | 986 | struct inode *inode = filp->f_dentry->d_inode; |
| 990 | 987 | return autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); | |
| 991 | mutex_lock(&autofs4_ioctl_mutex); | ||
| 992 | ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); | ||
| 993 | mutex_unlock(&autofs4_ioctl_mutex); | ||
| 994 | |||
| 995 | return ret; | ||
| 996 | } | 988 | } |
| 997 | 989 | ||
| 998 | #ifdef CONFIG_COMPAT | 990 | #ifdef CONFIG_COMPAT |
| @@ -1002,13 +994,11 @@ static long autofs4_root_compat_ioctl(struct file *filp, | |||
| 1002 | struct inode *inode = filp->f_path.dentry->d_inode; | 994 | struct inode *inode = filp->f_path.dentry->d_inode; |
| 1003 | int ret; | 995 | int ret; |
| 1004 | 996 | ||
| 1005 | mutex_lock(&autofs4_ioctl_mutex); | ||
| 1006 | if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL) | 997 | if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL) |
| 1007 | ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); | 998 | ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); |
| 1008 | else | 999 | else |
| 1009 | ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, | 1000 | ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, |
| 1010 | (unsigned long)compat_ptr(arg)); | 1001 | (unsigned long)compat_ptr(arg)); |
| 1011 | mutex_unlock(&autofs4_ioctl_mutex); | ||
| 1012 | 1002 | ||
| 1013 | return ret; | 1003 | return ret; |
| 1014 | } | 1004 | } |
