mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
f2fs: avoid freed stat information
The write_checkpoint can update stat information, so we should destroy the stat structure after it. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
5ac9f36fca
commit
eca616f8c1
@ -498,7 +498,6 @@ static void f2fs_put_super(struct super_block *sb)
|
||||
}
|
||||
kobject_del(&sbi->s_kobj);
|
||||
|
||||
f2fs_destroy_stats(sbi);
|
||||
stop_gc_thread(sbi);
|
||||
|
||||
/*
|
||||
@ -514,6 +513,9 @@ static void f2fs_put_super(struct super_block *sb)
|
||||
write_checkpoint(sbi, &cpc);
|
||||
}
|
||||
|
||||
/* write_checkpoint can update stat informaion */
|
||||
f2fs_destroy_stats(sbi);
|
||||
|
||||
/*
|
||||
* normally superblock is clean, so we need to release this.
|
||||
* In addition, EIO will skip do checkpoint, we need this as well.
|
||||
|
Loading…
Reference in New Issue
Block a user