From 47785db25c9ca96691f6b4d15f326ad478a56f1c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 12 Feb 2012 21:46:49 -0500 Subject: [PATCH] --- yaml --- r: 292325 b: refs/heads/master c: be0d93f0aa5682a24a2a9ec0dd26fffaad608cce h: refs/heads/master i: 292323: 2524915f208f86efe9bc3cefbd5a07e51ccf2ff1 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/super.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 3115233751f0..0b1995265390 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f56b0fbc6477e50303a503ee1453ed94e20f154a +refs/heads/master: be0d93f0aa5682a24a2a9ec0dd26fffaad608cce diff --git a/trunk/fs/ocfs2/super.c b/trunk/fs/ocfs2/super.c index 604e12c4e979..2b1184f7097f 100644 --- a/trunk/fs/ocfs2/super.c +++ b/trunk/fs/ocfs2/super.c @@ -1154,12 +1154,12 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) } status = ocfs2_mount_volume(sb); - if (osb->root_inode) - inode = igrab(osb->root_inode); - if (status < 0) goto read_super_error; + if (osb->root_inode) + inode = igrab(osb->root_inode); + if (!inode) { status = -EIO; mlog_errno(status); @@ -1168,6 +1168,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) root = d_alloc_root(inode); if (!root) { + iput(inode); status = -ENOMEM; mlog_errno(status); goto read_super_error; @@ -1220,9 +1221,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) read_super_error: brelse(bh); - if (inode) - iput(inode); - if (osb) { atomic_set(&osb->vol_state, VOLUME_DISABLED); wake_up(&osb->osb_mount_event);