Commit a1b0aa87 authored by Jan Harkes's avatar Jan Harkes Committed by Linus Torvalds

coda: remove struct coda_sb_info

The sb_info structure only contains a single pointer to the character device,
there is no need for the added indirection.
Signed-off-by: default avatarJan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5fd31e9a
...@@ -49,11 +49,6 @@ void coda_cache_clear_inode(struct inode *inode) ...@@ -49,11 +49,6 @@ void coda_cache_clear_inode(struct inode *inode)
/* remove all acl caches */ /* remove all acl caches */
void coda_cache_clear_all(struct super_block *sb) void coda_cache_clear_all(struct super_block *sb)
{ {
struct coda_sb_info *sbi;
sbi = coda_sbp(sb);
BUG_ON(!sbi);
atomic_inc(&permission_epoch); atomic_inc(&permission_epoch);
} }
......
...@@ -141,11 +141,10 @@ static int get_device_index(struct coda_mount_data *data) ...@@ -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) static int coda_fill_super(struct super_block *sb, void *data, int silent)
{ {
struct inode *root = NULL; struct inode *root = NULL;
struct coda_sb_info *sbi = NULL;
struct venus_comm *vc = NULL; struct venus_comm *vc = NULL;
struct CodaFid fid; struct CodaFid fid;
int error; int error;
int idx; int idx;
idx = get_device_index((struct coda_mount_data *) data); idx = get_device_index((struct coda_mount_data *) data);
...@@ -167,16 +166,9 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -167,16 +166,9 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
return -EBUSY; return -EBUSY;
} }
sbi = kmalloc(sizeof(struct coda_sb_info), GFP_KERNEL);
if(!sbi) {
return -ENOMEM;
}
vc->vc_sb = sb; vc->vc_sb = sb;
sbi->sbi_vcomm = vc; sb->s_fs_info = vc;
sb->s_fs_info = sbi;
sb->s_flags |= MS_NOATIME; sb->s_flags |= MS_NOATIME;
sb->s_blocksize = 4096; /* XXXXX what do we put here?? */ sb->s_blocksize = 4096; /* XXXXX what do we put here?? */
sb->s_blocksize_bits = 12; sb->s_blocksize_bits = 12;
...@@ -207,26 +199,20 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -207,26 +199,20 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
return 0; return 0;
error: error:
if (sbi) {
kfree(sbi);
if(vc)
vc->vc_sb = NULL;
}
if (root) 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) static void coda_put_super(struct super_block *sb)
{ {
struct coda_sb_info *sbi; coda_vcp(sb)->vc_sb = NULL;
sb->s_fs_info = NULL;
sbi = coda_sbp(sb);
sbi->sbi_vcomm->vc_sb = NULL;
printk("Coda: Bye bye.\n"); printk("Coda: Bye bye.\n");
kfree(sbi);
} }
static void coda_clear_inode(struct inode *inode) static void coda_clear_inode(struct inode *inode)
......
This diff is collapsed.
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
struct kstatfs; struct kstatfs;
struct coda_sb_info
{
struct venus_comm *sbi_vcomm;
};
/* communication pending/processing queues */ /* communication pending/processing queues */
struct venus_comm { struct venus_comm {
u_long vc_seq; u_long vc_seq;
...@@ -24,9 +19,9 @@ struct venus_comm { ...@@ -24,9 +19,9 @@ struct venus_comm {
}; };
static inline struct coda_sb_info *coda_sbp(struct super_block *sb) static inline struct venus_comm *coda_vcp(struct super_block *sb)
{ {
return ((struct coda_sb_info *)((sb)->s_fs_info)); return (struct venus_comm *)((sb)->s_fs_info);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment