diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-06-14 23:00:55 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-07-21 12:37:58 +0200 |
| commit | 6f3bb95078ce213cb3aaa23a3b455efadcb7ec1e (patch) | |
| tree | 0f702730cf5357ed91c1eeff9ec8c9111109260a /fs/f2fs/super.c | |
| parent | cf9dea3048df75379dc2f3c01efac59ba7548e0c (diff) | |
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>
Diffstat (limited to 'fs/f2fs/super.c')
| -rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index fbbb5007f..fd2ce9140 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -586,7 +586,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, }; |
