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:
Miklos Szeredi 2016-09-27 10:45:12 +02:00 • committed by Al Viro
commit a779638cf6
5 changed files with 25 additions and 22 deletions

View file

@ -1985,10 +1985,9 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
ret = fuse_dev_do_write(fud, &cs, len);
for (idx = 0; idx < nbuf; idx++) {
struct pipe_buffer *buf = &bufs[idx];
buf->ops->release(pipe, buf);
}
for (idx = 0; idx < nbuf; idx++)
pipe_buf_release(pipe, &bufs[idx]);
out:
kfree(bufs);
return ret;