summaryrefslogtreecommitdiffstats
path: root/fs/smbfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smbfs/inode.c')
-rw-r--r--fs/smbfs/inode.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 3b13fdd80..94923fbad 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -32,7 +32,7 @@
static void smb_put_inode(struct inode *);
static void smb_delete_inode(struct inode *);
static void smb_put_super(struct super_block *);
-static int smb_statfs(struct super_block *, struct statfs *, int);
+static int smb_statfs(struct super_block *, struct statfs *);
static void smb_set_inode_attr(struct inode *, struct smb_fattr *);
static struct super_operations smb_sops =
@@ -315,8 +315,6 @@ smb_put_super(struct super_block *sb)
kfree(sb->u.smbfs_sb.temp_buf);
if (server->packet)
smb_vfree(server->packet);
-
- MOD_DEC_USE_COUNT;
}
struct super_block *
@@ -326,15 +324,11 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
struct inode *root_inode;
struct smb_fattr root;
- MOD_INC_USE_COUNT;
-
if (!raw_data)
goto out_no_data;
if (((struct smb_mount_data *) raw_data)->version != SMB_MOUNT_VERSION)
goto out_wrong_data;
- lock_super(sb);
-
sb->s_blocksize = 1024; /* Eh... Is this correct? */
sb->s_blocksize_bits = 10;
sb->s_magic = SMB_SUPER_MAGIC;
@@ -389,7 +383,6 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
if (!sb->s_root)
goto out_no_root;
- unlock_super(sb);
return sb;
out_no_root:
@@ -401,7 +394,6 @@ out_no_temp:
smb_vfree(sb->u.smbfs_sb.packet);
out_no_mem:
printk(KERN_ERR "smb_read_super: allocation failure\n");
- unlock_super(sb);
goto out_fail;
out_wrong_data:
printk(KERN_ERR "SMBFS: need mount version %d\n", SMB_MOUNT_VERSION);
@@ -409,25 +401,17 @@ out_wrong_data:
out_no_data:
printk("smb_read_super: missing data argument\n");
out_fail:
- sb->s_dev = 0;
- MOD_DEC_USE_COUNT;
return NULL;
}
static int
-smb_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
+smb_statfs(struct super_block *sb, struct statfs *buf)
{
- struct statfs attr;
+ smb_proc_dskattr(sb, buf);
- memset(&attr, 0, sizeof(attr));
-
- smb_proc_dskattr(sb, &attr);
-
- attr.f_type = SMB_SUPER_MAGIC;
- attr.f_files = -1;
- attr.f_ffree = -1;
- attr.f_namelen = SMB_MAXPATHLEN;
- return copy_to_user(buf, &attr, bufsiz) ? -EFAULT : 0;
+ buf->f_type = SMB_SUPER_MAGIC;
+ buf->f_namelen = SMB_MAXPATHLEN;
+ return 0;
}
int
@@ -550,12 +534,7 @@ int smb_current_kmalloced;
int smb_current_vmalloced;
#endif
-static struct file_system_type smb_fs_type = {
- "smbfs",
- 0 /* FS_NO_DCACHE doesn't work correctly */,
- smb_read_super,
- NULL
-};
+static DECLARE_FSTYPE( smb_fs_type, "smbfs", smb_read_super, 0);
int __init init_smb_fs(void)
{