Skip to content

sched/wqueue: Fix work_cancel() to return -ENOENT when no such work is queued - #20046

Open
szafonimateusz-mi wants to merge 1 commit into
apache:masterfrom
szafonimateusz-mi:kwork_cancel
Open

sched/wqueue: Fix work_cancel() to return -ENOENT when no such work is queued#20046
szafonimateusz-mi wants to merge 1 commit into
apache:masterfrom
szafonimateusz-mi:kwork_cancel

Conversation

@szafonimateusz-mi

Copy link
Copy Markdown
Contributor

Summary

Fix work_cancel() to return -ENOENT when no such work is queued

Impact

required to pass intel64 LTP tests

Testing

NTFC

@github-actions github-actions Bot added Area: OS Components OS Components issues Size: XS The size of the change in this PR is very small labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

qemu-armv8a

Comment thread sched/wqueue/kwork_cancel.c
…s queued.

Fix work_cancel() to return -ENOENT when no such work is queued.

Signed-off-by: wushenhui <wushenhui@xiaomi.com>
}
else
{
ret = -ENOENT;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not return, but to through the remaining code

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

early return will change the behavior of this function for sync path. I haven't analyzed the consequences of this, so no early return.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but why return -ENOENT in this case? it's fine to return OK if work isn't queued yet since the final result is that the work doesn't fire anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: OS Components OS Components issues Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants