]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - ipc/util.c
WorkStruct: Pass the work_struct pointer instead of context data
[mirror_ubuntu-artful-kernel.git] / ipc / util.c
index cd8bb14a431f648a1327b3e84deb338e806b6a60..a9b7a227b8d4c7bde79998048206b96fef1f57ed 100644 (file)
@@ -514,6 +514,11 @@ void ipc_rcu_getref(void *ptr)
        container_of(ptr, struct ipc_rcu_hdr, data)->refcount++;
 }
 
+static void ipc_do_vfree(struct work_struct *work)
+{
+       vfree(container_of(work, struct ipc_rcu_sched, work));
+}
+
 /**
  * ipc_schedule_free - free ipc + rcu space
  * @head: RCU callback structure for queued work
@@ -528,7 +533,7 @@ static void ipc_schedule_free(struct rcu_head *head)
        struct ipc_rcu_sched *sched =
                        container_of(&(grace->data[0]), struct ipc_rcu_sched, data[0]);
 
-       INIT_WORK(&sched->work, vfree, sched);
+       INIT_WORK(&sched->work, ipc_do_vfree);
        schedule_work(&sched->work);
 }