diff options
Diffstat (limited to 'fs/smbfs')
| -rw-r--r-- | fs/smbfs/dir.c | 3 | ||||
| -rw-r--r-- | fs/smbfs/file.c | 5 | ||||
| -rw-r--r-- | fs/smbfs/inode.c | 12 | ||||
| -rw-r--r-- | fs/smbfs/ioctl.c | 10 | ||||
| -rw-r--r-- | fs/smbfs/proto.h | 2 | ||||
| -rw-r--r-- | fs/smbfs/symlink.c | 1 |
6 files changed, 17 insertions, 16 deletions
diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c index 3e4803b4427e..00a70cab1f36 100644 --- a/fs/smbfs/dir.c +++ b/fs/smbfs/dir.c | |||
| @@ -37,9 +37,10 @@ static int smb_link(struct dentry *, struct inode *, struct dentry *); | |||
| 37 | 37 | ||
| 38 | const struct file_operations smb_dir_operations = | 38 | const struct file_operations smb_dir_operations = |
| 39 | { | 39 | { |
| 40 | .llseek = generic_file_llseek, | ||
| 40 | .read = generic_read_dir, | 41 | .read = generic_read_dir, |
| 41 | .readdir = smb_readdir, | 42 | .readdir = smb_readdir, |
| 42 | .ioctl = smb_ioctl, | 43 | .unlocked_ioctl = smb_ioctl, |
| 43 | .open = smb_dir_open, | 44 | .open = smb_dir_open, |
| 44 | }; | 45 | }; |
| 45 | 46 | ||
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index dbf6548bbf06..8e187a0f94bb 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c | |||
| @@ -28,8 +28,9 @@ | |||
| 28 | #include "proto.h" | 28 | #include "proto.h" |
| 29 | 29 | ||
| 30 | static int | 30 | static int |
| 31 | smb_fsync(struct file *file, struct dentry * dentry, int datasync) | 31 | smb_fsync(struct file *file, int datasync) |
| 32 | { | 32 | { |
| 33 | struct dentry *dentry = file->f_path.dentry; | ||
| 33 | struct smb_sb_info *server = server_from_dentry(dentry); | 34 | struct smb_sb_info *server = server_from_dentry(dentry); |
| 34 | int result; | 35 | int result; |
| 35 | 36 | ||
| @@ -437,7 +438,7 @@ const struct file_operations smb_file_operations = | |||
| 437 | .aio_read = smb_file_aio_read, | 438 | .aio_read = smb_file_aio_read, |
| 438 | .write = do_sync_write, | 439 | .write = do_sync_write, |
| 439 | .aio_write = smb_file_aio_write, | 440 | .aio_write = smb_file_aio_write, |
| 440 | .ioctl = smb_ioctl, | 441 | .unlocked_ioctl = smb_ioctl, |
| 441 | .mmap = smb_file_mmap, | 442 | .mmap = smb_file_mmap, |
| 442 | .open = smb_file_open, | 443 | .open = smb_file_open, |
| 443 | .release = smb_file_release, | 444 | .release = smb_file_release, |
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index dfa1d67f8fca..450c91941988 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | #define SMB_TTL_DEFAULT 1000 | 47 | #define SMB_TTL_DEFAULT 1000 |
| 48 | 48 | ||
| 49 | static void smb_delete_inode(struct inode *); | 49 | static void smb_evict_inode(struct inode *); |
| 50 | static void smb_put_super(struct super_block *); | 50 | static void smb_put_super(struct super_block *); |
| 51 | static int smb_statfs(struct dentry *, struct kstatfs *); | 51 | static int smb_statfs(struct dentry *, struct kstatfs *); |
| 52 | static int smb_show_options(struct seq_file *, struct vfsmount *); | 52 | static int smb_show_options(struct seq_file *, struct vfsmount *); |
| @@ -102,7 +102,7 @@ static const struct super_operations smb_sops = | |||
| 102 | .alloc_inode = smb_alloc_inode, | 102 | .alloc_inode = smb_alloc_inode, |
| 103 | .destroy_inode = smb_destroy_inode, | 103 | .destroy_inode = smb_destroy_inode, |
| 104 | .drop_inode = generic_delete_inode, | 104 | .drop_inode = generic_delete_inode, |
| 105 | .delete_inode = smb_delete_inode, | 105 | .evict_inode = smb_evict_inode, |
| 106 | .put_super = smb_put_super, | 106 | .put_super = smb_put_super, |
| 107 | .statfs = smb_statfs, | 107 | .statfs = smb_statfs, |
| 108 | .show_options = smb_show_options, | 108 | .show_options = smb_show_options, |
| @@ -324,15 +324,15 @@ out: | |||
| 324 | * All blocking cleanup operations need to go here to avoid races. | 324 | * All blocking cleanup operations need to go here to avoid races. |
| 325 | */ | 325 | */ |
| 326 | static void | 326 | static void |
| 327 | smb_delete_inode(struct inode *ino) | 327 | smb_evict_inode(struct inode *ino) |
| 328 | { | 328 | { |
| 329 | DEBUG1("ino=%ld\n", ino->i_ino); | 329 | DEBUG1("ino=%ld\n", ino->i_ino); |
| 330 | truncate_inode_pages(&ino->i_data, 0); | 330 | truncate_inode_pages(&ino->i_data, 0); |
| 331 | end_writeback(ino); | ||
| 331 | lock_kernel(); | 332 | lock_kernel(); |
| 332 | if (smb_close(ino)) | 333 | if (smb_close(ino)) |
| 333 | PARANOIA("could not close inode %ld\n", ino->i_ino); | 334 | PARANOIA("could not close inode %ld\n", ino->i_ino); |
| 334 | unlock_kernel(); | 335 | unlock_kernel(); |
| 335 | clear_inode(ino); | ||
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | static struct option opts[] = { | 338 | static struct option opts[] = { |
| @@ -714,9 +714,7 @@ smb_notify_change(struct dentry *dentry, struct iattr *attr) | |||
| 714 | error = server->ops->truncate(inode, attr->ia_size); | 714 | error = server->ops->truncate(inode, attr->ia_size); |
| 715 | if (error) | 715 | if (error) |
| 716 | goto out; | 716 | goto out; |
| 717 | error = vmtruncate(inode, attr->ia_size); | 717 | truncate_setsize(inode, attr->ia_size); |
| 718 | if (error) | ||
| 719 | goto out; | ||
| 720 | refresh = 1; | 718 | refresh = 1; |
| 721 | } | 719 | } |
| 722 | 720 | ||
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 @@ | |||
| 13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
| 14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 15 | #include <linux/highuid.h> | 15 | #include <linux/highuid.h> |
| 16 | #include <linux/smp_lock.h> | ||
| 16 | #include <linux/net.h> | 17 | #include <linux/net.h> |
| 17 | 18 | ||
| 18 | #include <linux/smb_fs.h> | 19 | #include <linux/smb_fs.h> |
| @@ -22,14 +23,14 @@ | |||
| 22 | 23 | ||
| 23 | #include "proto.h" | 24 | #include "proto.h" |
| 24 | 25 | ||
| 25 | int | 26 | long |
| 26 | smb_ioctl(struct inode *inode, struct file *filp, | 27 | smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 27 | unsigned int cmd, unsigned long arg) | ||
| 28 | { | 28 | { |
| 29 | struct smb_sb_info *server = server_from_inode(inode); | 29 | struct smb_sb_info *server = server_from_inode(filp->f_path.dentry->d_inode); |
| 30 | struct smb_conn_opt opt; | 30 | struct smb_conn_opt opt; |
| 31 | int result = -EINVAL; | 31 | int result = -EINVAL; |
| 32 | 32 | ||
| 33 | lock_kernel(); | ||
| 33 | switch (cmd) { | 34 | switch (cmd) { |
| 34 | uid16_t uid16; | 35 | uid16_t uid16; |
| 35 | uid_t uid32; | 36 | uid_t uid32; |
| @@ -62,6 +63,7 @@ smb_ioctl(struct inode *inode, struct file *filp, | |||
| 62 | default: | 63 | default: |
| 63 | break; | 64 | break; |
| 64 | } | 65 | } |
| 66 | unlock_kernel(); | ||
| 65 | 67 | ||
| 66 | return result; | 68 | return result; |
| 67 | } | 69 | } |
diff --git a/fs/smbfs/proto.h b/fs/smbfs/proto.h index 03f456c1b7d4..05939a6f43e6 100644 --- a/fs/smbfs/proto.h +++ b/fs/smbfs/proto.h | |||
| @@ -67,7 +67,7 @@ extern const struct address_space_operations smb_file_aops; | |||
| 67 | extern const struct file_operations smb_file_operations; | 67 | extern const struct file_operations smb_file_operations; |
| 68 | extern const struct inode_operations smb_file_inode_operations; | 68 | extern const struct inode_operations smb_file_inode_operations; |
| 69 | /* ioctl.c */ | 69 | /* ioctl.c */ |
| 70 | extern int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); | 70 | extern long smb_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
| 71 | /* smbiod.c */ | 71 | /* smbiod.c */ |
| 72 | extern void smbiod_wake_up(void); | 72 | extern void smbiod_wake_up(void); |
| 73 | extern int smbiod_register_server(struct smb_sb_info *server); | 73 | extern int smbiod_register_server(struct smb_sb_info *server); |
diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c index 54350b59046b..00b2909bd469 100644 --- a/fs/smbfs/symlink.c +++ b/fs/smbfs/symlink.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
| 16 | #include <linux/net.h> | 16 | #include <linux/net.h> |
| 17 | #include <linux/namei.h> | 17 | #include <linux/namei.h> |
| 18 | #include <linux/slab.h> | ||
| 19 | 18 | ||
| 20 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
| 21 | #include <asm/system.h> | 20 | #include <asm/system.h> |
