aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/inode.c
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2007-07-19 04:48:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:48 -0400
commita1b0aa87647493c0201821ab884e86298d5da7d6 (patch)
treedf7c97e4ae6469b238f0f507eed86d906a5539b3 /fs/coda/inode.c
parent5fd31e9a67dd6c80e49240514cf854c1f054aca2 (diff)
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 29e441765600..6771a4271e33 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)
141 141
142static int coda_fill_super(struct super_block *sb, void *data, int silent) 142static int coda_fill_super(struct super_block *sb, void *data, int silent)
143{ 143{
144 struct inode *root = NULL; 144 struct inode *root = NULL;
145 struct coda_sb_info *sbi = NULL;
146 struct venus_comm *vc = NULL; 145 struct venus_comm *vc = NULL;
147 struct CodaFid fid; 146 struct CodaFid fid;
148 int error; 147 int error;
149 int idx; 148 int idx;
150 149
151 idx = get_device_index((struct coda_mount_data *) data); 150 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 return -EBUSY; 166 return -EBUSY;
168 } 167 }
169 168
170 sbi = kmalloc(sizeof(struct coda_sb_info), GFP_KERNEL);
171 if(!sbi) {
172 return -ENOMEM;
173 }
174
175 vc->vc_sb = sb; 169 vc->vc_sb = sb;
176 170
177 sbi->sbi_vcomm = vc; 171 sb->s_fs_info = vc;
178
179 sb->s_fs_info = sbi;
180 sb->s_flags |= MS_NOATIME; 172 sb->s_flags |= MS_NOATIME;
181 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */ 173 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */
182 sb->s_blocksize_bits = 12; 174 sb->s_blocksize_bits = 12;
@@ -207,26 +199,20 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
207 return 0; 199 return 0;
208 200
209 error: 201 error:
210 if (sbi) {
211 kfree(sbi);
212 if(vc)
213 vc->vc_sb = NULL;
214 }
215 if (root) 202 if (root)
216 iput(root); 203 iput(root);
204 if (vc)
205 vc->vc_sb = NULL;
217 206
218 return -EINVAL; 207 return -EINVAL;
219} 208}
220 209
221static void coda_put_super(struct super_block *sb) 210static void coda_put_super(struct super_block *sb)
222{ 211{
223 struct coda_sb_info *sbi; 212 coda_vcp(sb)->vc_sb = NULL;
224 213 sb->s_fs_info = NULL;
225 sbi = coda_sbp(sb);
226 sbi->sbi_vcomm->vc_sb = NULL;
227 214
228 printk("Coda: Bye bye.\n"); 215 printk("Coda: Bye bye.\n");
229 kfree(sbi);
230} 216}
231 217
232static void coda_clear_inode(struct inode *inode) 218static void coda_clear_inode(struct inode *inode)