aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 20:37:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-09 20:37:37 -0500
commite4e11180dfa545233e5145919b75b7fac88638df (patch)
treebfdb18eee49aa55fd3d6170a422164e772736a1b /fs/ext4
parent37cfc3f67db9f2d907f6bfcfae590cdbbef623e8 (diff)
parentadc0e91ab142abe93f5b0d7980ada8a7676231fe (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: new helper - d_make_root() dcache: use a dispose list in select_parent ceph: d_alloc_root() may fail ext4: fix failure exits isofs: inode leak on mount failure
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 64e2529ae9bb..ed3ce82e2de4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3733,10 +3733,12 @@ no_journal:
3733 } 3733 }
3734 if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) { 3734 if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
3735 ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck"); 3735 ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck");
3736 iput(root);
3736 goto failed_mount4; 3737 goto failed_mount4;
3737 } 3738 }
3738 sb->s_root = d_alloc_root(root); 3739 sb->s_root = d_alloc_root(root);
3739 if (!sb->s_root) { 3740 if (!sb->s_root) {
3741 iput(root);
3740 ext4_msg(sb, KERN_ERR, "get root dentry failed"); 3742 ext4_msg(sb, KERN_ERR, "get root dentry failed");
3741 ret = -ENOMEM; 3743 ret = -ENOMEM;
3742 goto failed_mount4; 3744 goto failed_mount4;
@@ -3773,7 +3775,7 @@ no_journal:
3773 if (err) { 3775 if (err) {
3774 ext4_msg(sb, KERN_ERR, "failed to initialize system " 3776 ext4_msg(sb, KERN_ERR, "failed to initialize system "
3775 "zone (%d)", err); 3777 "zone (%d)", err);
3776 goto failed_mount4; 3778 goto failed_mount4a;
3777 } 3779 }
3778 3780
3779 ext4_ext_init(sb); 3781 ext4_ext_init(sb);
@@ -3830,13 +3832,14 @@ cantfind_ext4:
3830failed_mount7: 3832failed_mount7:
3831 ext4_unregister_li_request(sb); 3833 ext4_unregister_li_request(sb);
3832failed_mount6: 3834failed_mount6:
3833 ext4_ext_release(sb);
3834failed_mount5:
3835 ext4_mb_release(sb); 3835 ext4_mb_release(sb);
3836failed_mount5:
3837 ext4_ext_release(sb);
3836 ext4_release_system_zone(sb); 3838 ext4_release_system_zone(sb);
3837failed_mount4: 3839failed_mount4a:
3838 iput(root); 3840 dput(sb->s_root);
3839 sb->s_root = NULL; 3841 sb->s_root = NULL;
3842failed_mount4:
3840 ext4_msg(sb, KERN_ERR, "mount failed"); 3843 ext4_msg(sb, KERN_ERR, "mount failed");
3841 destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq); 3844 destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq);
3842failed_mount_wq: 3845failed_mount_wq: