From 286af7741f29216ffe53e329aa462c2e487bb9e9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 27 Apr 2010 16:24:25 +0200 Subject: [PATCH] --- yaml --- r: 198162 b: refs/heads/master c: ce8273a573918612cbd320597db3d5dd89578454 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/smbfs/dir.c | 2 +- trunk/fs/smbfs/file.c | 2 +- trunk/fs/smbfs/ioctl.c | 10 ++++++---- trunk/fs/smbfs/proto.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index a1ffa5d59388..a0825cb51016 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 977183902a52d1e0adc986f9462424db5a545044 +refs/heads/master: ce8273a573918612cbd320597db3d5dd89578454 diff --git a/trunk/fs/smbfs/dir.c b/trunk/fs/smbfs/dir.c index 3e4803b4427e..6c978428892d 100644 --- a/trunk/fs/smbfs/dir.c +++ b/trunk/fs/smbfs/dir.c @@ -39,7 +39,7 @@ const struct file_operations smb_dir_operations = { .read = generic_read_dir, .readdir = smb_readdir, - .ioctl = smb_ioctl, + .unlocked_ioctl = smb_ioctl, .open = smb_dir_open, }; diff --git a/trunk/fs/smbfs/file.c b/trunk/fs/smbfs/file.c index dbf6548bbf06..84ecf0e43f91 100644 --- a/trunk/fs/smbfs/file.c +++ b/trunk/fs/smbfs/file.c @@ -437,7 +437,7 @@ const struct file_operations smb_file_operations = .aio_read = smb_file_aio_read, .write = do_sync_write, .aio_write = smb_file_aio_write, - .ioctl = smb_ioctl, + .unlocked_ioctl = smb_ioctl, .mmap = smb_file_mmap, .open = smb_file_open, .release = smb_file_release, diff --git a/trunk/fs/smbfs/ioctl.c b/trunk/fs/smbfs/ioctl.c index dbae1f8ea26f..07215312ad39 100644 --- a/trunk/fs/smbfs/ioctl.c +++ b/trunk/fs/smbfs/ioctl.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -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; } diff --git a/trunk/fs/smbfs/proto.h b/trunk/fs/smbfs/proto.h index 03f456c1b7d4..05939a6f43e6 100644 --- a/trunk/fs/smbfs/proto.h +++ b/trunk/fs/smbfs/proto.h @@ -67,7 +67,7 @@ extern const struct address_space_operations smb_file_aops; extern const struct file_operations smb_file_operations; extern const struct inode_operations smb_file_inode_operations; /* ioctl.c */ -extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +extern long smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); /* smbiod.c */ extern void smbiod_wake_up(void); extern int smbiod_register_server(struct smb_sb_info *server);