diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-27 16:24:25 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-17 05:27:04 +0200 |
commit | ce8273a573918612cbd320597db3d5dd89578454 (patch) | |
tree | f3a6df94053ee0c3276c318e108c88bc479106c3 /fs/smbfs/ioctl.c | |
parent | 977183902a52d1e0adc986f9462424db5a545044 (diff) | |
download | linux-ce8273a573918612cbd320597db3d5dd89578454.tar.gz linux-ce8273a573918612cbd320597db3d5dd89578454.tar.bz2 linux-ce8273a573918612cbd320597db3d5dd89578454.zip |
smbfs: Push down BKL into ioctl function
Converting from ->ioctl to ->unlocked_ioctl with explicit
lock_kernel lets us kill the ioctl operation.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[fixed inode reference in smb_ioctl]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'fs/smbfs/ioctl.c')
-rw-r--r-- | fs/smbfs/ioctl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/smbfs/ioctl.c b/fs/smbfs/ioctl.c index dbae1f8ea26f..07215312ad39 100644 --- a/fs/smbfs/ioctl.c +++ b/fs/smbfs/ioctl.c @@ -13,6 +13,7 @@ #include <linux/time.h> #include <linux/mm.h> #include <linux/highuid.h> +#include <linux/smp_lock.h> #include <linux/net.h> #include <linux/smb_fs.h> @@ -22,14 +23,14 @@ #include "proto.h" -int -smb_ioctl(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg) +long +smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { - struct smb_sb_info *server = server_from_inode(inode); + struct smb_sb_info *server = server_from_inode(filp->f_path.dentry->d_inode); struct smb_conn_opt opt; int result = -EINVAL; + lock_kernel(); switch (cmd) { uid16_t uid16; uid_t uid32; @@ -62,6 +63,7 @@ smb_ioctl(struct inode *inode, struct file *filp, default: break; } + unlock_kernel(); return result; } |