mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] slow-work: use get_ref wrapper instead of directly calling get_ref
@ 2010-03-29  6:51 Dave Airlie
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2010-03-29  6:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dave Airlie, David Howells

Otherwise we can get an oops if the user has no get_ref/put_ref
requirement.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 kernel/slow-work.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/slow-work.c b/kernel/slow-work.c
index 7494bbf..7d3f4fa 100644
--- a/kernel/slow-work.c
+++ b/kernel/slow-work.c
@@ -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;
 
-- 
1.6.5.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] slow-work: use get_ref wrapper instead of directly calling get_ref
@ 2010-03-29 11:01 David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2010-03-29 11:01 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-cachefs, linux-kernel, Dave Airlie, David Howells

From: Dave Airlie <airlied@redhat.com>

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>
---

 kernel/slow-work.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/slow-work.c b/kernel/slow-work.c
index 7494bbf..7d3f4fa 100644
--- a/kernel/slow-work.c
+++ b/kernel/slow-work.c
@@ -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;
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-29 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29  6:51 [PATCH] slow-work: use get_ref wrapper instead of directly calling get_ref Dave Airlie
2010-03-29 11:01 David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome