From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id C94727F3F for ; Mon, 26 Aug 2013 15:47:30 -0500 (CDT) Date: Mon, 26 Aug 2013 15:47:30 -0500 From: Ben Myers Subject: [PATCH] xfs: don't leak root inode reference Message-ID: <20130826204730.GZ7153@sgi.com> MIME-Version: 1.0 Content-Disposition: inline List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com Cc: Al Viro Looks like in 48fde701 we removed the iput of the root inode in xfs_fs_fill_super for the error case. Add it back. Signed-off-by: Ben Myers --- fs/xfs/xfs_super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: b/fs/xfs/xfs_super.c =================================================================== --- a/fs/xfs/xfs_super.c 2013-08-26 15:36:09.170848579 -0500 +++ b/fs/xfs/xfs_super.c 2013-08-26 15:40:19.450817933 -0500 @@ -1493,12 +1493,12 @@ xfs_fs_fill_super( } if (is_bad_inode(root)) { error = EINVAL; - goto out_unmount; + goto out_iput; } sb->s_root = d_make_root(root); if (!sb->s_root) { error = ENOMEM; - goto out_unmount; + goto out_iput; } return 0; @@ -1519,6 +1519,8 @@ out_destroy_workqueues: out: return -error; + out_iput: + iput(root); out_unmount: xfs_filestream_unmount(mp); xfs_unmountfs(mp); _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs