gfs2: Use wait_event_freezable_timeout() for freezable kthread
authorKevin Hao <haokexin@gmail.com>
Mon, 18 Dec 2023 05:35:58 +0000 (13:35 +0800)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 21 Dec 2023 21:53:46 +0000 (22:53 +0100)
commitedd13270fa0660fda608b5f2bf989c770d90d469
tree825538b4681c2831414a9d16738d693c939986ca
parent76e7211ca129f6a9117ae88c020a4c1cafaa24cc
gfs2: Use wait_event_freezable_timeout() for freezable kthread

A freezable kernel thread can enter frozen state during freezing by
either calling try_to_freeze() or using wait_event_freezable() and its
variants. So for the following snippet of code in a kernel thread loop:
  try_to_freeze();
  wait_event_interruptible_timeout();

We can change it to a simple wait_event_freezable_timeout() and then
eliminate a function call.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c
fs/gfs2/quota.c