[PATCH 3/9] async: Extend kfence to allow struct embedding

2016-07-13 Thread Peter Zijlstra
On Fri, Jun 24, 2016 at 10:08:47AM +0100, Chris Wilson wrote: > @@ -151,7 +161,11 @@ static void kfence_free(struct kref *kref) > > WARN_ON(atomic_read(>pending) > 0); > > - kfree(fence); > + if (fence->flags) { > + kfence_notify_t fn = (kfence_notify_t)fence->flags;

[PATCH 3/9] async: Extend kfence to allow struct embedding

2016-06-24 Thread Chris Wilson
Provide a kfence_init() function for use for embedding the kfence into a parent structure. kfence_init() takes an optional function pointer argument should the caller wish to be notified when the kfence is complete. This is useful for allowing the kfences to drive other state machinery.