pipe: add pipe_buf_release() helper

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 659eaaf..48b8c27 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -709,9 +709,7 @@
 		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--;
 		}