mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
pipe: add pipe_buf_release() helper
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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…
Add table
Add a link
Reference in a new issue