aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-02-12 21:46:49 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:34 -0400
commitbe0d93f0aa5682a24a2a9ec0dd26fffaad608cce (patch)
treefc35e184e39ffe630dfa62e881cb8dbd5d6db22c
parentf56b0fbc6477e50303a503ee1453ed94e20f154a (diff)
... and the same failure exits cleanup for ocfs2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/ocfs2/super.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 604e12c4e979..2b1184f7097f 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1154,12 +1154,12 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
1154 } 1154 }
1155 1155
1156 status = ocfs2_mount_volume(sb); 1156 status = ocfs2_mount_volume(sb);
1157 if (osb->root_inode)
1158 inode = igrab(osb->root_inode);
1159
1160 if (status < 0) 1157 if (status < 0)
1161 goto read_super_error; 1158 goto read_super_error;
1162 1159
1160 if (osb->root_inode)
1161 inode = igrab(osb->root_inode);
1162
1163 if (!inode) { 1163 if (!inode) {
1164 status = -EIO; 1164 status = -EIO;
1165 mlog_errno(status); 1165 mlog_errno(status);
@@ -1168,6 +1168,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
1168 1168
1169 root = d_alloc_root(inode); 1169 root = d_alloc_root(inode);
1170 if (!root) { 1170 if (!root) {
1171 iput(inode);
1171 status = -ENOMEM; 1172 status = -ENOMEM;
1172 mlog_errno(status); 1173 mlog_errno(status);
1173 goto read_super_error; 1174 goto read_super_error;
@@ -1220,9 +1221,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
1220read_super_error: 1221read_super_error:
1221 brelse(bh); 1222 brelse(bh);
1222 1223
1223 if (inode)
1224 iput(inode);
1225
1226 if (osb) { 1224 if (osb) {
1227 atomic_set(&osb->vol_state, VOLUME_DISABLED); 1225 atomic_set(&osb->vol_state, VOLUME_DISABLED);
1228 wake_up(&osb->osb_mount_event); 1226 wake_up(&osb->osb_mount_event);