Lines Matching defs:rpc
1177 struct rpc {
1303 struct rpc *rpc, *tmp;
1310 list_for_each_entry_safe(rpc, tmp, &calls, list) {
1311 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg);
1318 list_for_each_entry_safe(rpc, tmp, &calls, list)
1319 rpc->result = r;
1322 list_for_each_entry_safe(rpc, tmp, &calls, list)
1323 complete(&rpc->complete);
1354 * Make an rpc call to the worker to change the metadata.
1356 static int perform_rpc(struct era *era, struct rpc *rpc)
1358 rpc->result = 0;
1359 init_completion(&rpc->complete);
1362 list_add(&rpc->list, &era->rpc_calls);
1366 wait_for_completion(&rpc->complete);
1368 return rpc->result;
1373 struct rpc rpc;
1374 rpc.fn0 = fn;
1375 rpc.fn1 = NULL;
1377 return perform_rpc(era, &rpc);
1383 struct rpc rpc;
1384 rpc.fn0 = NULL;
1385 rpc.fn1 = fn;
1386 rpc.arg = arg;
1388 return perform_rpc(era, &rpc);