From: Chao Yu Date: Sat, 21 Apr 2018 09:53:52 +0000 (+0800) Subject: f2fs: fix to detect failure of dquot_initialize X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad8d61efc9b7b158095fac6a7f764d6897ef7952;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git f2fs: fix to detect failure of dquot_initialize [ Upstream commit c22aecd75919511abea872b201751e0be1add898 ] dquot_initialize() can fail due to any exception inside quota subsystem, f2fs needs to be aware of it, and return correct return value to caller. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 97537ce5127c..1b361afcbb67 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2493,7 +2493,9 @@ static int f2fs_ioc_setproject(struct file *filp, __u32 projid) } f2fs_put_page(ipage, 1); - dquot_initialize(inode); + err = dquot_initialize(inode); + if (err) + goto out_unlock; transfer_to[PRJQUOTA] = dqget(sb, make_kqid_projid(kprojid)); if (!IS_ERR(transfer_to[PRJQUOTA])) {