From: Chao Yu Date: Mon, 24 Jul 2017 09:12:06 +0000 (+0800) Subject: f2fs: record quota during dot{,dot} recovery X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6d3a479ae082173c6102eba0e502cc439dacf21;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git f2fs: record quota during dot{,dot} recovery In ->lookup(), we will have a try to recover dot or dotdot for corrupted directory, once disk quota is on, if it allocates new block during dotdot recovery, we need to record disk quota info for the allocation, so this patch fixes this issue by adding missing dquot_initialize() in __recover_dot_dentries. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 26b4d2b54812..98e13f123d87 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -266,6 +266,10 @@ static int __recover_dot_dentries(struct inode *dir, nid_t pino) return 0; } + err = dquot_initialize(dir); + if (err) + return err; + f2fs_balance_fs(sbi, true); f2fs_lock_op(sbi);