diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-01-27 17:59:53 -0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-02-04 10:34:08 -0800 |
| commit | 22cb0dec0ee2c1d493d3e4b409cafddfca9e3e72 (patch) | |
| tree | c34591acf9ddee987e0913f52f0b86f47fc933df | |
| parent | 909e1f05afb5522a3e5bf34e07e6c8a58d1d56cb (diff) | |
f2fs: flush quota blocks after turnning it off
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)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 6cb1c2e94f34..38e50a4bf26d 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2027,6 +2027,12 @@ void f2fs_quota_off_umount(struct super_block *sb) set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR); } } + /* + * 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); } static void f2fs_truncate_quota_inode_pages(struct super_block *sb) |
