Commit 4d48c169 authored by Yangtao Li's avatar Yangtao Li Committed by Treehugger Robot
Browse files

BACKPORT: f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt...


BACKPORT: f2fs: don't call f2fs_issue_discard_timeout() when discard_cmd_cnt is 0 in f2fs_put_super()

No need to call f2fs_issue_discard_timeout() in f2fs_put_super,
when no discard command requires issue. Since the caller of
f2fs_issue_discard_timeout() usually judges the number of discard
commands before using it. Let's move this logic to
f2fs_issue_discard_timeout().

By the way, use f2fs_realtime_discard_enable to simplify the code.

Bug: 352129251
Reported-by: default avatarkernel test robot <lkp@intel.com>
Change-Id: I86577a0d195a3598624bc763c2bc6087013537c5
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 9d44110b)
parent 18cd0c21
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment