---
name: "cancel_delayed_work"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cancel_delayed_work"
---

# cancel\_delayed\_work(9)

cancel a delayed work

## NAME

cancel\_delayed\_work - cancel a delayed work

## SYNOPSIS

**bool cancel\_delayed\_work(struct delayed\_work \*** *dwork***);**

## ARGUMENTS

*dwork*

delayed\_work to cancel

## DESCRIPTION

Kill off a pending delayed\_work.

## RETURN

**true** if *dwork* was pending and canceled; **false** if it wasn't pending.

## NOTE

The work callback function may still be running on return, unless it returns **true** and the work doesn't re-arm itself. Explicitly flush or use **cancel\_delayed\_work\_sync** to wait on it.

This function is safe to call from any context including IRQ handler.

## COPYRIGHT
