diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-16 12:38:15 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-20 09:00:13 -0700 |
commit | a21c20f0c812925085204fced932ac95f2a76bf0 (patch) | |
tree | 4d01f678a3f2183c49ecc15f01623f6ca9b5a27d /fs/f2fs | |
parent | 5ee5293c3290a8e710d75977418f954e62c3dfdf (diff) | |
download | linux-a21c20f0c812925085204fced932ac95f2a76bf0.tar.gz linux-a21c20f0c812925085204fced932ac95f2a76bf0.tar.bz2 linux-a21c20f0c812925085204fced932ac95f2a76bf0.zip |
f2fs: go out for insert_inode_locked failure
We should not call unlock_new_inode when insert_inode_locked failed.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/namei.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 97e97c41b979..a680bf38e4f0 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); |