X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=file_write.c;h=ef25b0f5695d09c539635cdffe32a3b4cc6dbe53;hp=7d63469f8ef68d9ed9e99531c6b31ab7307612dd;hb=c998e827328c7989986e4fb91048e7f427f722a8;hpb=d1e6b28f66e243516d01916f9125baee75dd98d6 diff --git a/file_write.c b/file_write.c index 7d63469f..ef25b0f5 100644 --- a/file_write.c +++ b/file_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2014 Andre Noll + * Copyright (C) 2006 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -74,9 +74,9 @@ out: return ret; } -static void file_write_pre_select(struct sched *s, struct task *t) +static void file_write_pre_select(struct sched *s, void *context) { - struct writer_node *wn = container_of(t, struct writer_node, task); + struct writer_node *wn = context; struct private_file_write_data *pfwd = wn->private_data; int ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_LEAF); @@ -97,17 +97,16 @@ static void file_write_close(struct writer_node *wn) free(pfwd); } -static int file_write_post_select(__a_unused struct sched *s, - struct task *t) +static int file_write_post_select(__a_unused struct sched *s, void *context) { - struct writer_node *wn = container_of(t, struct writer_node, task); + struct writer_node *wn = context; struct private_file_write_data *pfwd = wn->private_data; struct btr_node *btrn = wn->btrn; int ret; char *buf; size_t bytes; - ret = task_get_notification(t); + ret = task_get_notification(wn->task); if (ret < 0) goto out; ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF);