mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pipe: add pipe_buf_release() helper
Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
7bf2d1df80
commit
a779638cf6
5 changed files with 25 additions and 22 deletions
|
|
@ -709,9 +709,7 @@ static void pipe_advance(struct iov_iter *i, size_t size)
|
|||
int unused = (pipe->curbuf + pipe->nrbufs) & (pipe->buffers - 1);
|
||||
/* [curbuf,unused) is in use. Free [idx,unused) */
|
||||
while (idx != unused) {
|
||||
buf = &pipe->bufs[idx];
|
||||
buf->ops->release(pipe, buf);
|
||||
buf->ops = NULL;
|
||||
pipe_buf_release(pipe, &pipe->bufs[idx]);
|
||||
idx = next_idx(idx, pipe);
|
||||
pipe->nrbufs--;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue