linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / ncpfs / inode.c
index b76e57b..d277a58 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/system.h>
@@ -38,7 +39,7 @@
 
 static void ncp_delete_inode(struct inode *);
 static void ncp_put_super(struct super_block *);
-static int  ncp_statfs(struct dentry *, struct kstatfs *);
+static int  ncp_statfs(struct super_block *, struct kstatfs *);
 
 static kmem_cache_t * ncp_inode_cachep;
 
@@ -62,7 +63,7 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
 
        if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
            SLAB_CTOR_CONSTRUCTOR) {
-               mutex_init(&ei->open_mutex);
+               init_MUTEX(&ei->open_sem);
                inode_init_once(&ei->vfs_inode);
        }
 }
@@ -71,8 +72,7 @@ static int init_inodecache(void)
 {
        ncp_inode_cachep = kmem_cache_create("ncp_inode_cache",
                                             sizeof(struct ncp_inode_info),
-                                            0, (SLAB_RECLAIM_ACCOUNT|
-                                               SLAB_MEM_SPREAD),
+                                            0, SLAB_RECLAIM_ACCOUNT,
                                             init_once, NULL);
        if (ncp_inode_cachep == NULL)
                return -ENOMEM;
@@ -104,7 +104,7 @@ static struct super_operations ncp_sops =
 
 extern struct dentry_operations ncp_root_dentry_operations;
 #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
-extern const struct address_space_operations ncp_symlink_aops;
+extern struct address_space_operations ncp_symlink_aops;
 extern int ncp_symlink(struct inode*, struct dentry*, const char*);
 #endif
 
@@ -224,6 +224,7 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)
        inode->i_nlink = 1;
        inode->i_uid = server->m.uid;
        inode->i_gid = server->m.gid;
+       inode->i_blksize = NCP_BLOCK_SIZE;
 
        ncp_update_dates(inode, &nwinfo->i);
        ncp_update_inode(inode, nwinfo);
@@ -519,7 +520,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
        }
 
 /*     server->lock = 0;       */
-       mutex_init(&server->mutex);
+       init_MUTEX(&server->sem);
        server->packet = NULL;
 /*     server->buffer_size = 0;        */
 /*     server->conn_status = 0;        */
@@ -556,7 +557,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
        server->dentry_ttl = 0; /* no caching */
 
        INIT_LIST_HEAD(&server->tx.requests);
-       mutex_init(&server->rcv.creq_mutex);
+       init_MUTEX(&server->rcv.creq_sem);
        server->tx.creq         = NULL;
        server->rcv.creq        = NULL;
        server->data_ready      = sock->sk->sk_data_ready;
@@ -722,14 +723,13 @@ static void ncp_put_super(struct super_block *sb)
        kfree(server);
 }
 
-static int ncp_statfs(struct dentry *dentry, struct kstatfs *buf)
+static int ncp_statfs(struct super_block *sb, struct kstatfs *buf)
 {
        struct dentry* d;
        struct inode* i;
        struct ncp_inode_info* ni;
        struct ncp_server* s;
        struct ncp_volume_info vi;
-       struct super_block *sb = dentry->d_sb;
        int err;
        __u8 dh;
        
@@ -956,10 +956,10 @@ out:
        return result;
 }
 
-static int ncp_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct super_block *ncp_get_sb(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data)
 {
-       return get_sb_nodev(fs_type, flags, data, ncp_fill_super, mnt);
+       return get_sb_nodev(fs_type, flags, data, ncp_fill_super);
 }
 
 static struct file_system_type ncp_fs_type = {