summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorSheng Yong <shengyong1@huawei.com>2018-04-21 14:12:50 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-05-31 11:31:47 -0700
commita515d12f1b180ce88273ff20b065baa1c4da3284 (patch)
tree8481a8b6198c7f7de9162b0e6432c7084ce082d2 /fs/f2fs/checkpoint.c
parentc22aecd75919511abea872b201751e0be1add898 (diff)
downloadlinux-a515d12f1b180ce88273ff20b065baa1c4da3284.tar.bz2
f2fs: remove duplicated dquot_initialize and fix error handling
This patch removes duplicated dquot_initialize in recover_orphan_inode(), and fix the error handling if dquot_initialize fails. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 8fc55d42ba25..33d2da006789 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -589,10 +589,11 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
}
err = dquot_initialize(inode);
- if (err)
+ if (err) {
+ iput(inode);
goto err_out;
+ }
- dquot_initialize(inode);
clear_nlink(inode);
/* truncate all the data during iput */