diff --git a/fs/io-wq.c b/fs/io-wq.c
index 3dc10bfd8c3baa4a7130ab9caf6cdbf90cf5bd84..2dd43bdb9c7b6d96d9cceb031409fc85992e17d7 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -388,11 +388,9 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe)
 
 static bool io_flush_signals(void)
 {
-	if (unlikely(test_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL))) {
+	if (unlikely(test_thread_flag(TIF_NOTIFY_SIGNAL))) {
 		__set_current_state(TASK_RUNNING);
-		if (current->task_works)
-			task_work_run();
-		clear_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL);
+		tracehook_notify_signal();
 		return true;
 	}
 	return false;
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 543551d70327fa95f58e3d95718f3d917c50ff65..be04bc6b5b99133505d9d78fb9e3cc4dd8cccf4b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6873,7 +6873,7 @@ static int io_run_task_work_sig(void)
 		return 1;
 	if (!signal_pending(current))
 		return 0;
-	if (test_tsk_thread_flag(current, TIF_NOTIFY_SIGNAL))
+	if (test_thread_flag(TIF_NOTIFY_SIGNAL))
 		return -ERESTARTSYS;
 	return -EINTR;
 }