---
name: "__get_request"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/__get_request"
---

# \_\_get\_request(9)

get a free request

## NAME

\_\_get\_request - get a free request

## SYNOPSIS

**struct request \* \_\_get\_request(struct request\_list \*** *rl***, int** *op***, int** *op\_flags***, struct bio \*** *bio***, gfp\_t** *gfp\_mask***);**

## ARGUMENTS

*rl*

request list to allocate from

*op*

REQ\_OP\_READ/REQ\_OP\_WRITE

*op\_flags*

rq\_flag\_bits

*bio*

bio to allocate request for (can be **NULL**)

*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\*.

## COPYRIGHT
