return found ? operation : NULL;
}
-static int gb_message_send(struct gb_message *message)
+static int gb_message_send(struct gb_message *message, gfp_t gfp)
{
struct gb_connection *connection = message->operation->connection;
* dropping the initial reference to the operation.
*/
int gb_operation_request_send(struct gb_operation *operation,
- gb_operation_callback callback)
+ gb_operation_callback callback,
+ gfp_t gfp)
{
struct gb_connection *connection = operation->connection;
struct gb_operation_msg_hdr *header;
/* All set, send the request */
gb_operation_result_set(operation, -EINPROGRESS);
- ret = gb_message_send(operation->request);
+ ret = gb_message_send(operation->request, gfp);
if (ret)
gb_operation_put(operation);
int ret;
unsigned long timeout;
- ret = gb_operation_request_send(operation, gb_operation_sync_callback);
+ ret = gb_operation_request_send(operation, gb_operation_sync_callback,
+ GFP_KERNEL);
if (ret)
return ret;
/* Fill in the response header and send it */
operation->response->header->result = gb_operation_errno_map(errno);
- ret = gb_message_send(operation->response);
+ ret = gb_message_send(operation->response, GFP_KERNEL);
if (ret)
gb_operation_put(operation);
size_t response_size);
int gb_operation_request_send(struct gb_operation *operation,
- gb_operation_callback callback);
+ gb_operation_callback callback,
+ gfp_t gfp);
int gb_operation_request_send_sync(struct gb_operation *operation);
int gb_operation_response_send(struct gb_operation *operation, int errno);