X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Fcoda%2Finode.c;h=2f58dfc70083536004ea5f1d8945be4650c27992;hb=b87e81e5c6e64ae0eae3b4f61bf07bfeec856184;hp=dbff1bd4fb96b13c3b28b39876220c6cac2363ef;hpb=d07b3c25327c5ae3792d0ed0c135dee4727200a1;p=linux-2.6-microblaze.git diff --git a/fs/coda/inode.c b/fs/coda/inode.c index dbff1bd4fb96..2f58dfc70083 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -58,19 +58,19 @@ static void coda_destroy_inode(struct inode *inode) kmem_cache_free(coda_inode_cachep, ITOC(inode)); } -static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) +static void init_once(struct kmem_cache * cachep, void *foo) { struct coda_inode_info *ei = (struct coda_inode_info *) foo; inode_init_once(&ei->vfs_inode); } - + int coda_init_inodecache(void) { coda_inode_cachep = kmem_cache_create("coda_inode_cache", sizeof(struct coda_inode_info), 0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, - init_once, NULL); + init_once); if (coda_inode_cachep == NULL) return -ENOMEM; return 0; @@ -83,7 +83,7 @@ void coda_destroy_inodecache(void) static int coda_remount(struct super_block *sb, int *flags, char *data) { - *flags |= MS_NODIRATIME; + *flags |= MS_NOATIME; return 0; } @@ -141,11 +141,10 @@ static int get_device_index(struct coda_mount_data *data) static int coda_fill_super(struct super_block *sb, void *data, int silent) { - struct inode *root = NULL; - struct coda_sb_info *sbi = NULL; + struct inode *root = NULL; struct venus_comm *vc = NULL; struct CodaFid fid; - int error; + int error; int idx; idx = get_device_index((struct coda_mount_data *) data); @@ -167,21 +166,14 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) return -EBUSY; } - sbi = kmalloc(sizeof(struct coda_sb_info), GFP_KERNEL); - if(!sbi) { - return -ENOMEM; - } - vc->vc_sb = sb; - sbi->sbi_vcomm = vc; - - sb->s_fs_info = sbi; - sb->s_flags |= MS_NODIRATIME; /* probably even noatime */ - sb->s_blocksize = 1024; /* XXXXX what do we put here?? */ - sb->s_blocksize_bits = 10; - sb->s_magic = CODA_SUPER_MAGIC; - sb->s_op = &coda_super_operations; + sb->s_fs_info = vc; + sb->s_flags |= MS_NOATIME; + sb->s_blocksize = 4096; /* XXXXX what do we put here?? */ + sb->s_blocksize_bits = 12; + sb->s_magic = CODA_SUPER_MAGIC; + sb->s_op = &coda_super_operations; /* get root fid from Venus: this needs the root inode */ error = venus_rootfid(sb, &fid); @@ -207,26 +199,20 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) return 0; error: - if (sbi) { - kfree(sbi); - if(vc) - vc->vc_sb = NULL; - } if (root) - iput(root); + iput(root); + if (vc) + vc->vc_sb = NULL; - return -EINVAL; + return -EINVAL; } static void coda_put_super(struct super_block *sb) { - struct coda_sb_info *sbi; - - sbi = coda_sbp(sb); - sbi->sbi_vcomm->vc_sb = NULL; + coda_vcp(sb)->vc_sb = NULL; + sb->s_fs_info = NULL; printk("Coda: Bye bye.\n"); - kfree(sbi); } static void coda_clear_inode(struct inode *inode) @@ -296,7 +282,7 @@ static int coda_statfs(struct dentry *dentry, struct kstatfs *buf) /* and fill in the rest */ buf->f_type = CODA_SUPER_MAGIC; - buf->f_bsize = 1024; + buf->f_bsize = 4096; buf->f_namelen = CODA_MAXNAMLEN; return 0;