mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
f2fs: set CP_TRIMMED_FLAG correctly
Don't set CP_TRIMMED_FLAG for non-zoned block device or discard unsupported device, it can avoid to trigger unneeded checkpoint for that kind of device. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
67773a1fbd
commit
663f387b71
1 changed files with 1 additions and 1 deletions
|
|
@ -587,7 +587,7 @@ static void f2fs_put_super(struct super_block *sb)
|
|||
/* be sure to wait for any on-going discard commands */
|
||||
f2fs_wait_discard_bios(sbi);
|
||||
|
||||
if (!sbi->discard_blks) {
|
||||
if (f2fs_discard_en(sbi) && !sbi->discard_blks) {
|
||||
struct cp_control cpc = {
|
||||
.reason = CP_UMOUNT | CP_TRIMMED,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue