'\" t .\" Title: __get_request .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Block Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "__GET_REQUEST" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Block Devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" __get_request \- get a free request .SH "SYNOPSIS" .HP \w'struct\ request\ *\ __get_request('u .BI "struct request * __get_request(struct\ request_list\ *\ " "rl" ", int\ " "op" ", int\ " "op_flags" ", struct\ bio\ *\ " "bio" ", gfp_t\ " "gfp_mask" ");" .SH "ARGUMENTS" .PP \fIrl\fR .RS 4 request list to allocate from .RE .PP \fIop\fR .RS 4 REQ_OP_READ/REQ_OP_WRITE .RE .PP \fIop_flags\fR .RS 4 rq_flag_bits .RE .PP \fIbio\fR .RS 4 bio to allocate request for (can be \fBNULL\fR) .RE .PP \fIgfp_mask\fR .RS 4 allocation mask .RE .SH "DESCRIPTION" .PP Get a free request from \fIq\fR\&. This function may fail under memory pressure or if \fIq\fR is dead\&. .PP Must be called with \fIq\fR\->queue_lock held and, Returns ERR_PTR on failure, with \fIq\fR\->queue_lock held\&. Returns request pointer on success, with \fIq\fR\->queue_lock *not held*\&. .SH "COPYRIGHT" .br