linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 4/5] f2fs: go out for insert_inode_locked failure
Date: Tue, 18 Aug 2015 01:46:28 -0700	[thread overview]
Message-ID: <1439887589-35190-4-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1439887589-35190-1-git-send-email-jaegeuk@kernel.org>

We should not call unlock_new_inode when insert_inode_locked failed.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/namei.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 97e97c4..a680bf3 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -53,7 +53,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
 	if (err) {
 		err = -EINVAL;
 		nid_free = true;
-		goto out;
+		goto fail;
 	}
 
 	/* If the directory encrypted, then we should encrypt the inode. */
@@ -75,9 +75,6 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
 	mark_inode_dirty(inode);
 	return inode;
 
-out:
-	clear_nlink(inode);
-	unlock_new_inode(inode);
 fail:
 	trace_f2fs_new_inode(inode, err);
 	make_bad_inode(inode);
-- 
2.1.1


------------------------------------------------------------------------------

  parent reply	other threads:[~2015-08-18  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18  8:46 [PATCH 1/5] f2fs: reuse nids more aggressively Jaegeuk Kim
2015-08-18  8:46 ` [PATCH 2/5] f2fs: fix to cover lock_op for update_inode_page Jaegeuk Kim
2015-08-20  9:09   ` Chao Yu
2015-08-18  8:46 ` [PATCH 3/5] f2fs: retry gc if one section is not successfully reclaimed Jaegeuk Kim
2015-08-18  8:46 ` Jaegeuk Kim [this message]
2015-08-20  9:11   ` [f2fs-dev] [PATCH 4/5] f2fs: go out for insert_inode_locked failure Chao Yu
2015-08-18  8:46 ` [PATCH 5/5] f2fs: check the node block address of newly allocated nid Jaegeuk Kim
2015-08-20  9:12   ` Chao Yu
2015-08-20 15:35     ` Jaegeuk Kim
2015-08-21 12:48       ` [f2fs-dev] " Chao Yu
2015-08-21 14:59         ` Chao Yu
2015-08-24  9:38           ` [f2fs-dev] " Chao Yu
2015-08-20  9:01 ` [f2fs-dev] [PATCH 1/5] f2fs: reuse nids more aggressively Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439887589-35190-4-git-send-email-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).