* [PATCH] f2fs: remove duplicated dquot_initialize and fix error handling
@ 2018-04-21 6:12 Sheng Yong
2018-04-23 8:22 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yong @ 2018-04-21 6:12 UTC (permalink / raw)
To: jaegeuk, yuchao0; +Cc: linux-f2fs-devel
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>
---
fs/f2fs/checkpoint.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 2e23b953d304..b1e61a125cc7 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 */
--
2.14.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-23 8:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-21 6:12 [PATCH] f2fs: remove duplicated dquot_initialize and fix error handling Sheng Yong
2018-04-23 8:22 ` Chao Yu
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).