diff options
Diffstat (limited to 'fs/logfs')
-rw-r--r-- | fs/logfs/super.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c index 2b2693851969..d651e10a1e9c 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c | |||
@@ -337,27 +337,27 @@ static int logfs_get_sb_final(struct super_block *sb, struct vfsmount *mnt) | |||
337 | goto fail; | 337 | goto fail; |
338 | 338 | ||
339 | sb->s_root = d_alloc_root(rootdir); | 339 | sb->s_root = d_alloc_root(rootdir); |
340 | if (!sb->s_root) | 340 | if (!sb->s_root) { |
341 | goto fail2; | 341 | iput(rootdir); |
342 | goto fail; | ||
343 | } | ||
342 | 344 | ||
343 | super->s_erase_page = alloc_pages(GFP_KERNEL, 0); | 345 | super->s_erase_page = alloc_pages(GFP_KERNEL, 0); |
344 | if (!super->s_erase_page) | 346 | if (!super->s_erase_page) |
345 | goto fail2; | 347 | goto fail; |
346 | memset(page_address(super->s_erase_page), 0xFF, PAGE_SIZE); | 348 | memset(page_address(super->s_erase_page), 0xFF, PAGE_SIZE); |
347 | 349 | ||
348 | /* FIXME: check for read-only mounts */ | 350 | /* FIXME: check for read-only mounts */ |
349 | err = logfs_make_writeable(sb); | 351 | err = logfs_make_writeable(sb); |
350 | if (err) | 352 | if (err) |
351 | goto fail3; | 353 | goto fail1; |
352 | 354 | ||
353 | log_super("LogFS: Finished mounting\n"); | 355 | log_super("LogFS: Finished mounting\n"); |
354 | simple_set_mnt(mnt, sb); | 356 | simple_set_mnt(mnt, sb); |
355 | return 0; | 357 | return 0; |
356 | 358 | ||
357 | fail3: | 359 | fail1: |
358 | __free_page(super->s_erase_page); | 360 | __free_page(super->s_erase_page); |
359 | fail2: | ||
360 | iput(rootdir); | ||
361 | fail: | 361 | fail: |
362 | iput(logfs_super(sb)->s_master_inode); | 362 | iput(logfs_super(sb)->s_master_inode); |
363 | return -EIO; | 363 | return -EIO; |