Name

__get_request — get a free request

Synopsis

struct request * __get_request (struct request_list * rl,
 unsigned int op,
 struct bio * bio,
 gfp_t gfp_mask);
 

Arguments

struct request_list * rl

request list to allocate from

unsigned int op

operation and flags

struct bio * bio

bio to allocate request for (can be NULL)

gfp_t gfp_mask

allocation mask

Description

Get a free request from q. This function may fail under memory pressure or if q is dead.

Must be called with q->queue_lock held and, Returns ERR_PTR on failure, with q->queue_lock held. Returns request pointer on success, with q->queue_lock *not held*.