summaryrefslogtreecommitdiffstats
path: root/fs/coda/inode.c
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2007-07-19 01:48:50 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 10:04:48 -0700
commita1b0aa87647493c0201821ab884e86298d5da7d6 (patch)
treedf7c97e4ae6469b238f0f507eed86d906a5539b3 /fs/coda/inode.c
parent5fd31e9a67dd6c80e49240514cf854c1f054aca2 (diff)
downloadop-kernel-dev-a1b0aa87647493c0201821ab884e86298d5da7d6.zip
op-kernel-dev-a1b0aa87647493c0201821ab884e86298d5da7d6.tar.gz
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: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda/inode.c')
-rw-r--r--fs/coda/inode.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 29e4417..6771a42 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -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,16 +166,9 @@ 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_fs_info = vc;
sb->s_flags |= MS_NOATIME;
sb->s_blocksize = 4096; /* XXXXX what do we put here?? */
sb->s_blocksize_bits = 12;
@@ -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)
OpenPOWER on IntegriCloud