diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 8fc55d42ba25e7abe6b749b3feedcb6b5466014f..33d2da0067898201cf266f1fc28e34efc62ab27b 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 */