patch-2.0.1 linux/fs/nfs/nfsiod.c
Next file: linux/fs/nfs/proc.c
Previous file: linux/fs/nfs/file.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Sat Jun 29 12:00:46 1996
- Orig file:
v2.0.0/linux/fs/nfs/nfsiod.c
- Orig date:
Mon Apr 8 19:01:45 1996
diff -u --recursive --new-file v2.0.0/linux/fs/nfs/nfsiod.c linux/fs/nfs/nfsiod.c
@@ -37,7 +37,7 @@
* Reserve an nfsiod slot and initialize the request struct
*/
struct nfsiod_req *
-nfsiod_reserve(struct nfs_server *server, nfsiod_done_fn_t callback)
+nfsiod_reserve(struct nfs_server *server)
{
struct nfsiod_req *req;
@@ -56,8 +56,6 @@
}
req->rq_server = server;
- req->rq_callback = callback;
-
return req;
}
@@ -74,21 +72,12 @@
/*
* Transmit a request and put it on nfsiod's list of pending requests.
*/
-int
+void
nfsiod_enqueue(struct nfsiod_req *req)
{
- int result;
-
dprintk("BIO: enqueuing request %p\n", &req->rq_rpcreq);
- result = rpc_transmit(req->rq_server->rsock, &req->rq_rpcreq);
- if (result < 0) {
- dprintk("BIO: rpc_transmit returned %d\n", result);
- } else {
- dprintk("BIO: waking up nfsiod (%p)\n", req->rq_wait);
- wake_up(&req->rq_wait);
- schedule();
- }
- return result;
+ wake_up(&req->rq_wait);
+ schedule();
}
/*
@@ -120,8 +109,10 @@
current->pid);
active++;
dprintk("BIO: before: now %d nfsiod's active\n", active);
- result = nfs_rpc_doio(req->rq_server, &req->rq_rpcreq, 1);
- req->rq_callback(result, req);
+ do {
+ result = nfs_rpc_doio(req->rq_server,
+ &req->rq_rpcreq, 1);
+ } while (!req->rq_callback(result, req));
active--;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov