Lines Matching defs:rpc
1196 struct rpc {
1326 struct rpc *rpc, *tmp;
1333 list_for_each_entry_safe(rpc, tmp, &calls, list) {
1334 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg);
1341 list_for_each_entry_safe(rpc, tmp, &calls, list)
1342 rpc->result = r;
1345 list_for_each_entry_safe(rpc, tmp, &calls, list)
1346 complete(&rpc->complete);
1377 * Make an rpc call to the worker to change the metadata.
1379 static int perform_rpc(struct era *era, struct rpc *rpc)
1381 rpc->result = 0;
1382 init_completion(&rpc->complete);
1385 list_add(&rpc->list, &era->rpc_calls);
1389 wait_for_completion(&rpc->complete);
1391 return rpc->result;
1396 struct rpc rpc;
1398 rpc.fn0 = fn;
1399 rpc.fn1 = NULL;
1401 return perform_rpc(era, &rpc);
1407 struct rpc rpc;
1409 rpc.fn0 = NULL;
1410 rpc.fn1 = fn;
1411 rpc.arg = arg;
1413 return perform_rpc(era, &rpc);