Skip to content

Commit

Permalink
slow-work: use get_ref wrapper instead of directly calling get_ref
Browse files Browse the repository at this point in the history
Otherwise we can get an oops if the user has no get_ref/put_ref
requirement.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dave Airlie authored and Linus Torvalds committed Mar 29, 2010
1 parent 376a21f commit 88be12c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/slow-work.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ int delayed_slow_work_enqueue(struct delayed_slow_work *dwork,
goto cancelled;

/* the timer holds a reference whilst it is pending */
ret = work->ops->get_ref(work);
ret = slow_work_get_ref(work);
if (ret < 0)
goto cant_get_ref;

Expand Down

0 comments on commit 88be12c

Please sign in to comment.