autofs4 - remove ioctl mutex (bz23142)

With the recent changes to remove the BKL a mutex was added to the
ioctl entry point for calls to the old ioctl interface. This mutex
needs to be removed because of the need for the expire ioctl to call
back to the daemon to perform a umount and receive a completion
status (via another ioctl).

This should be fine as the new ioctl interface uses much of the same
code and it has been used without a mutex for around a year without
issue, as was the original intention.

Ref: Bugzilla bug 23142

Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Ian Kent and committed by Linus Torvalds de47de74 cf7d7e5a

+1 -11
+1 -11
fs/autofs4/root.c
··· 980 } 981 } 982 983 - static DEFINE_MUTEX(autofs4_ioctl_mutex); 984 - 985 static long autofs4_root_ioctl(struct file *filp, 986 unsigned int cmd, unsigned long arg) 987 { 988 - long ret; 989 struct inode *inode = filp->f_dentry->d_inode; 990 - 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 } 997 998 #ifdef CONFIG_COMPAT ··· 994 struct inode *inode = filp->f_path.dentry->d_inode; 995 int ret; 996 997 - mutex_lock(&autofs4_ioctl_mutex); 998 if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL) 999 ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); 1000 else 1001 ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, 1002 (unsigned long)compat_ptr(arg)); 1003 - mutex_unlock(&autofs4_ioctl_mutex); 1004 1005 return ret; 1006 }
··· 980 } 981 } 982 983 static long autofs4_root_ioctl(struct file *filp, 984 unsigned int cmd, unsigned long arg) 985 { 986 struct inode *inode = filp->f_dentry->d_inode; 987 + return autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); 988 } 989 990 #ifdef CONFIG_COMPAT ··· 1002 struct inode *inode = filp->f_path.dentry->d_inode; 1003 int ret; 1004 1005 if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL) 1006 ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, arg); 1007 else 1008 ret = autofs4_root_ioctl_unlocked(inode, filp, cmd, 1009 (unsigned long)compat_ptr(arg)); 1010 1011 return ret; 1012 }