aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/inode.c')
-rw-r--r--fs/coda/inode.c46
1 files changed, 16 insertions, 30 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index dbff1bd4fb96..6771a4271e33 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -83,7 +83,7 @@ void coda_destroy_inodecache(void)
83 83
84static int coda_remount(struct super_block *sb, int *flags, char *data) 84static int coda_remount(struct super_block *sb, int *flags, char *data)
85{ 85{
86 *flags |= MS_NODIRATIME; 86 *flags |= MS_NOATIME;
87 return 0; 87 return 0;
88} 88}
89 89
@@ -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,21 +166,14 @@ 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 172 sb->s_flags |= MS_NOATIME;
179 sb->s_fs_info = sbi; 173 sb->s_blocksize = 4096; /* XXXXX what do we put here?? */
180 sb->s_flags |= MS_NODIRATIME; /* probably even noatime */ 174 sb->s_blocksize_bits = 12;
181 sb->s_blocksize = 1024; /* XXXXX what do we put here?? */ 175 sb->s_magic = CODA_SUPER_MAGIC;
182 sb->s_blocksize_bits = 10; 176 sb->s_op = &coda_super_operations;
183 sb->s_magic = CODA_SUPER_MAGIC;
184 sb->s_op = &coda_super_operations;
185 177
186 /* get root fid from Venus: this needs the root inode */ 178 /* get root fid from Venus: this needs the root inode */
187 error = venus_rootfid(sb, &fid); 179 error = venus_rootfid(sb, &fid);
@@ -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)
@@ -296,7 +282,7 @@ static int coda_statfs(struct dentry *dentry, struct kstatfs *buf)
296 282
297 /* and fill in the rest */ 283 /* and fill in the rest */
298 buf->f_type = CODA_SUPER_MAGIC; 284 buf->f_type = CODA_SUPER_MAGIC;
299 buf->f_bsize = 1024; 285 buf->f_bsize = 4096;
300 buf->f_namelen = CODA_MAXNAMLEN; 286 buf->f_namelen = CODA_MAXNAMLEN;
301 287
302 return 0; 288 return 0;