summaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/inode.c')
-rw-r--r--fs/ncpfs/inode.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 85cc9bd39..349eec589 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -34,7 +34,7 @@
static void ncp_put_inode(struct inode *);
static void ncp_delete_inode(struct inode *);
static void ncp_put_super(struct super_block *);
-static int ncp_statfs(struct super_block *, struct statfs *, int);
+static int ncp_statfs(struct super_block *, struct statfs *);
static struct super_operations ncp_sops =
{
@@ -273,7 +273,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
#endif
struct ncp_entry_info finfo;
- MOD_INC_USE_COUNT;
if (raw_data == NULL)
goto out_no_data;
switch (*(int*)raw_data) {
@@ -323,8 +322,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
if (!S_ISSOCK(ncp_filp->f_dentry->d_inode->i_mode))
goto out_bad_file2;
- lock_super(sb);
-
sb->s_blocksize = 1024; /* Eh... Is this correct? */
sb->s_blocksize_bits = 10;
sb->s_magic = NCP_SUPER_MAGIC;
@@ -441,7 +438,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
if (!sb->s_root)
goto out_no_root;
sb->s_root->d_op = &ncp_dentry_operations;
- unlock_super(sb);
return sb;
out_no_root:
@@ -473,7 +469,6 @@ out_free_server:
* it doesn't proper unlocking.
*/
fput(ncp_filp);
- unlock_super(sb);
goto out;
out_bad_file2:
@@ -488,8 +483,6 @@ out_bad_mount:
out_no_data:
printk(KERN_ERR "ncp_read_super: missing data argument\n");
out:
- sb->s_dev = 0;
- MOD_DEC_USE_COUNT;
return NULL;
}
@@ -524,28 +517,23 @@ static void ncp_put_super(struct super_block *sb)
ncp_kfree_s(server->auth.object_name, server->auth.object_name_len);
ncp_kfree_s(server->packet, server->packet_size);
- MOD_DEC_USE_COUNT;
}
-static int ncp_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
+static int ncp_statfs(struct super_block *sb, struct statfs *buf)
{
- struct statfs tmp;
-
/* We cannot say how much disk space is left on a mounted
NetWare Server, because free space is distributed over
volumes, and the current user might have disk quotas. So
free space is not that simple to determine. Our decision
here is to err conservatively. */
- tmp.f_type = NCP_SUPER_MAGIC;
- tmp.f_bsize = NCP_BLOCK_SIZE;
- tmp.f_blocks = 0;
- tmp.f_bfree = 0;
- tmp.f_bavail = 0;
- tmp.f_files = -1;
- tmp.f_ffree = -1;
- tmp.f_namelen = 12;
- return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
+ buf->f_type = NCP_SUPER_MAGIC;
+ buf->f_bsize = NCP_BLOCK_SIZE;
+ buf->f_blocks = 0;
+ buf->f_bfree = 0;
+ buf->f_bavail = 0;
+ buf->f_namelen = 12;
+ return 0;
}
int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
@@ -708,12 +696,7 @@ int ncp_malloced;
int ncp_current_malloced;
#endif
-static struct file_system_type ncp_fs_type = {
- "ncpfs",
- 0 /* FS_NO_DCACHE doesn't work correctly */,
- ncp_read_super,
- NULL
-};
+static DECLARE_FSTYPE(ncp_fs_type, "ncpfs", ncp_read_super, 0);
int __init init_ncp_fs(void)
{