summaryrefslogtreecommitdiffstats
path: root/lib/iov_iter.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-09-27 10:45:12 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-10-05 18:23:58 -0400
commita779638cf622f069a484e8802134cca3c6c71415 (patch)
treea9eb77b635e86421465f6e06d1e29bc406cfdc8c /lib/iov_iter.c
parent7bf2d1df80822ec056363627e2014990f068f7aa (diff)
downloadlinux-a779638cf622f069a484e8802134cca3c6c71415.tar.bz2
pipe: add pipe_buf_release() helper
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/iov_iter.c')
-rw-r--r--lib/iov_iter.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 659eaafcde65..48b8c27acabb 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -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--;
}