aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/super.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-04-04 22:37:28 -0400
committerTejun Heo <tj@kernel.org>2010-04-04 22:37:28 -0400
commit336f5899d287f06d8329e208fc14ce50f7ec9698 (patch)
tree9b762d450d5eb248a6ff8317badb7e223d93ed58 /fs/logfs/super.c
parenta4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff)
parentdb217dece3003df0841bacf9556b5c06aa097dae (diff)
Merge branch 'master' into export-slabh
Diffstat (limited to 'fs/logfs/super.c')
-rw-r--r--fs/logfs/super.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c
index 46990eafe052..b60bfac3263c 100644
--- a/fs/logfs/super.c
+++ b/fs/logfs/super.c
@@ -278,7 +278,7 @@ static int logfs_recover_sb(struct super_block *sb)
278 } 278 }
279 if (valid0 && valid1 && ds_cmp(ds0, ds1)) { 279 if (valid0 && valid1 && ds_cmp(ds0, ds1)) {
280 printk(KERN_INFO"Superblocks don't match - fixing.\n"); 280 printk(KERN_INFO"Superblocks don't match - fixing.\n");
281 return write_one_sb(sb, super->s_devops->find_last_sb); 281 return logfs_write_sb(sb);
282 } 282 }
283 /* If neither is valid now, something's wrong. Didn't we properly 283 /* If neither is valid now, something's wrong. Didn't we properly
284 * check them before?!? */ 284 * check them before?!? */
@@ -290,6 +290,10 @@ static int logfs_make_writeable(struct super_block *sb)
290{ 290{
291 int err; 291 int err;
292 292
293 err = logfs_open_segfile(sb);
294 if (err)
295 return err;
296
293 /* Repair any broken superblock copies */ 297 /* Repair any broken superblock copies */
294 err = logfs_recover_sb(sb); 298 err = logfs_recover_sb(sb);
295 if (err) 299 if (err)
@@ -300,10 +304,6 @@ static int logfs_make_writeable(struct super_block *sb)
300 if (err) 304 if (err)
301 return err; 305 return err;
302 306
303 err = logfs_open_segfile(sb);
304 if (err)
305 return err;
306
307 /* Do one GC pass before any data gets dirtied */ 307 /* Do one GC pass before any data gets dirtied */
308 logfs_gc_pass(sb); 308 logfs_gc_pass(sb);
309 309
@@ -329,7 +329,7 @@ static int logfs_get_sb_final(struct super_block *sb, struct vfsmount *mnt)
329 329
330 sb->s_root = d_alloc_root(rootdir); 330 sb->s_root = d_alloc_root(rootdir);
331 if (!sb->s_root) 331 if (!sb->s_root)
332 goto fail; 332 goto fail2;
333 333
334 super->s_erase_page = alloc_pages(GFP_KERNEL, 0); 334 super->s_erase_page = alloc_pages(GFP_KERNEL, 0);
335 if (!super->s_erase_page) 335 if (!super->s_erase_page)
@@ -573,8 +573,7 @@ int logfs_get_sb_device(struct file_system_type *type, int flags,
573 return 0; 573 return 0;
574 574
575err1: 575err1:
576 up_write(&sb->s_umount); 576 deactivate_locked_super(sb);
577 deactivate_super(sb);
578 return err; 577 return err;
579err0: 578err0:
580 kfree(super); 579 kfree(super);