diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-27 10:45:12 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-09-28 01:51:16 -0400 |
commit | f784d0de20af7e4487e231b793c048f487104eda (patch) | |
tree | 24889484767e6748f47c92c8cab8440a0519d326 /lib | |
parent | 7f94689d2bea8c316507f2ed291c7c3bc936a675 (diff) |
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')
-rw-r--r-- | lib/iov_iter.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index aee0add3a96c..278b4df86530 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -702,9 +702,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--; } |