summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-07-24 17:12:06 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-09-21 14:04:29 -0700
commit186801baf7a2bee5fd187a123a533e46ccfc8e2b (patch)
tree6b653dfca1a498ddb71469fd262448d285f09734
parent40f4330d958ba11f77c3e443dc98ffe2b9f3cdd1 (diff)
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 <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/namei.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index f098ae65363b..a0bd1c68ec9c 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);