diff options
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -302,6 +302,20 @@ int generic_pipe_buf_confirm(struct pipe_inode_info *info, | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | /** | ||
306 | * generic_pipe_buf_release - put a reference to a &struct pipe_buffer | ||
307 | * @pipe: the pipe that the buffer belongs to | ||
308 | * @buf: the buffer to put a reference to | ||
309 | * | ||
310 | * Description: | ||
311 | * This function releases a reference to @buf. | ||
312 | */ | ||
313 | void generic_pipe_buf_release(struct pipe_inode_info *pipe, | ||
314 | struct pipe_buffer *buf) | ||
315 | { | ||
316 | page_cache_release(buf->page); | ||
317 | } | ||
318 | |||
305 | static const struct pipe_buf_operations anon_pipe_buf_ops = { | 319 | static const struct pipe_buf_operations anon_pipe_buf_ops = { |
306 | .can_merge = 1, | 320 | .can_merge = 1, |
307 | .map = generic_pipe_buf_map, | 321 | .map = generic_pipe_buf_map, |