aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu2018-04-21 17:53:52 +0800
committerJaegeuk Kim2018-05-31 11:31:47 -0700
commitc22aecd75919511abea872b201751e0be1add898 (patch)
treefa88170d322760e5cb1c1beb9a21de03dcecf2c8
parentd618477473ebd9abc26580a762f460860e541f57 (diff)
f2fs: fix to detect failure of dquot_initialize
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 <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index d2b4145cb34e..ac6452261926 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2576,7 +2576,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])) {