diff mbox

f2fs: turn quota off when error occurs

Message ID 20171020155337.5354-1-jaegeuk@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jaegeuk Kim Oct. 20, 2017, 3:53 p.m. UTC
Before changing readonly, it needs to turn quota off.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/checkpoint.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Chao Yu Oct. 22, 2017, 3:16 p.m. UTC | #1
On 2017/10/20 23:53, Jaegeuk Kim wrote:
> Before changing readonly, it needs to turn quota off.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/checkpoint.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 201608281681..ff74665d7f2d 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -29,6 +29,7 @@ struct kmem_cache *inode_entry_slab;
>  void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io)
>  {
>  	set_ckpt_flags(sbi, CP_ERROR_FLAG);
> +	f2fs_quota_off_umount(sb);
>  	sbi->sb->s_flags |= MS_RDONLY;
>  	if (!end_io)

Oh, f2fs_stop_checkpoint can be called from end_io, how about adding
f2fs_quota_off_umount here?

Thanks,

>  		f2fs_flush_merged_writes(sbi);
>
diff mbox

Patch

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 201608281681..ff74665d7f2d 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -29,6 +29,7 @@  struct kmem_cache *inode_entry_slab;
 void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io)
 {
 	set_ckpt_flags(sbi, CP_ERROR_FLAG);
+	f2fs_quota_off_umount(sb);
 	sbi->sb->s_flags |= MS_RDONLY;
 	if (!end_io)
 		f2fs_flush_merged_writes(sbi);