From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sandeen Subject: [PATCH 5/6] jfs: fix up error handling for insert_inode_locked Date: Tue, 06 Dec 2011 17:10:03 -0600 Message-ID: <4EDEA0CB.4040208@sandeen.net> References: <4EDE9D54.1030506@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: jfs-discussion@lists.sourceforge.net To: "linux-fsdevel@vger.kernel.org" Return-path: Received: from sandeen.net ([63.231.237.45]:51128 "EHLO mail.sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753539Ab1LFXKE (ORCPT ); Tue, 6 Dec 2011 18:10:04 -0500 In-Reply-To: <4EDE9D54.1030506@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: after 250df6ed274d767da844a5d9f05720b804240197 (fs: protect inode->i_state with inode->i_lock), insert_inode_locked() no longer returns the inode with I_NEW set on failure. However, the error handler still calls unlock_new_inode() on failure, which does a WARN_ON if I_NEW is not set, so any failure spews a lot of warnings. Signed-off-by: Eric Sandeen --- diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index c1a3e60..7f464c5 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -95,7 +95,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) if (insert_inode_locked(inode) < 0) { rc = -EINVAL; - goto fail_unlock; + goto fail_put; } inode_init_owner(inode, parent, mode); @@ -156,7 +156,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode) fail_drop: dquot_drop(inode); inode->i_flags |= S_NOQUOTA; -fail_unlock: clear_nlink(inode); unlock_new_inode(inode); fail_put: