SUNRPC: Generalize the RPC buffer release API
[linux-2.6-block.git] / net / sunrpc / xprtsock.c
index bd30b4b18d726ad4a9090d718688f914000c6eef..bde39f2ff6e5cc91e76b915c1c07074a4350d775 100644 (file)
@@ -2560,13 +2560,11 @@ static int bc_malloc(struct rpc_task *task)
 /*
  * Free the space allocated in the bc_alloc routine
  */
-static void bc_free(void *buffer)
+static void bc_free(struct rpc_task *task)
 {
+       void *buffer = task->tk_rqstp->rq_buffer;
        struct rpc_buffer *buf;
 
-       if (!buffer)
-               return;
-
        buf = container_of(buffer, struct rpc_buffer, data);
        free_page((unsigned long)buf);
 }