diff options
author | Yu Kuai <yukuai3@huawei.com> | 2023-05-23 05:10:15 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2023-06-14 01:25:13 +0300 |
commit | c333673a78307abe6b1f6998809288fcd86740ed (patch) | |
tree | e1020da57890dee0daaba3cd96a831dee8b11116 /drivers | |
parent | 955a257d69e44cea09b0375b8f2f3d4d9fcf7b4e (diff) | |
download | linux-c333673a78307abe6b1f6998809288fcd86740ed.tar.xz |
md/bitmap: always wake up md_thread in timeout_store
md_wakeup_thread() can handle the case that pass in md_thread is NULL,
the only difference is that md_wakeup_thread() will be called when
current timeout is 'MAX_SCHEDULE_TIMEOUT', this should not matter
because timeout_store() is not hot path, and the daemon process is
woke up more than demand from other context already.
Prepare to factor out a helper to set timeout.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230523021017.3048783-4-yukuai1@huaweicloud.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md-bitmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 358a06495902..4b5ba81c53be 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2476,11 +2476,11 @@ timeout_store(struct mddev *mddev, const char *buf, size_t len) * the bitmap is all clean and we don't need to * adjust the timeout right now */ - if (mddev->thread->timeout < MAX_SCHEDULE_TIMEOUT) { + if (mddev->thread->timeout < MAX_SCHEDULE_TIMEOUT) mddev->thread->timeout = timeout; - md_wakeup_thread(mddev->thread); - } } + + md_wakeup_thread(mddev->thread); return len; } |