diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index f60f7725e676..585bc0d02054 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -506,15 +506,17 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry) trace_f2fs_unlink_enter(dir, dentry); - if (unlikely(f2fs_cp_error(sbi))) - return -EIO; + if (unlikely(f2fs_cp_error(sbi))) { + err = -EIO; + goto fail; + } err = dquot_initialize(dir); if (err) - return err; + goto fail; err = dquot_initialize(inode); if (err) - return err; + goto fail; de = f2fs_find_entry(dir, &dentry->d_name, &page); if (!de) {