Skip to content
Commit 25547439 authored by Yangtao Li's avatar Yangtao Li Committed by Jaegeuk Kim
Browse files

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.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 15e38ee4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment