summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2019-01-27 17:59:53 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 12:42:52 +0100
commitc9c4c606965387206a3993d7cc556aa66d53c647 (patch)
treecbb20fd27bb2bd5622506e53585a38351e75be38 /fs/f2fs
parent1de0fd828661a068a574381c5bcd3b0a19f522c5 (diff)
f2fs: flush quota blocks after turnning it off
[ Upstream commit 0e0667b625cf64243df83171bff61f9d350b9ca5 ] After quota_off, we'll get some dirty blocks. If put_super don't have a chance to flush them by checkpoint, it causes NULL pointer exception in end_io after iput(node_inode). (e.g., by checkpoint=disable) Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index e70975ca723b..0f3209b23c94 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1523,6 +1523,12 @@ void f2fs_quota_off_umount(struct super_block *sb)
set_sbi_flag(F2FS_SB(sb), SBI_NEED_FSCK);
}
}
+ /*
+ * In case of checkpoint=disable, we must flush quota blocks.
+ * This can cause NULL exception for node_inode in end_io, since
+ * put_super already dropped it.
+ */
+ sync_filesystem(sb);
}
int f2fs_get_projid(struct inode *inode, kprojid_t *projid)