···201201EXPORT_SYMBOL(generic_pipe_buf_get);202202203203/**204204- * generic_pipe_buf_confirm - verify contents of the pipe buffer205205- * @info: the pipe that the buffer belongs to206206- * @buf: the buffer to confirm207207- *208208- * Description:209209- * This function does nothing, because the generic pipe code uses210210- * pages that are always good when inserted into the pipe.211211- */212212-int generic_pipe_buf_confirm(struct pipe_inode_info *info,213213- struct pipe_buffer *buf)214214-{215215- return 0;216216-}217217-EXPORT_SYMBOL(generic_pipe_buf_confirm);218218-219219-/**220204 * generic_pipe_buf_release - put a reference to a &struct pipe_buffer221205 * @pipe: the pipe that the buffer belongs to222206 * @buf: the buffer to put a reference to···216232EXPORT_SYMBOL(generic_pipe_buf_release);217233218234static const struct pipe_buf_operations anon_pipe_buf_ops = {219219- .confirm = generic_pipe_buf_confirm,220235 .release = anon_pipe_buf_release,221236 .steal = anon_pipe_buf_steal,222237 .get = generic_pipe_buf_get,
···8282 * and that the contents are good. If the pages in the pipe belong8383 * to a file system, we may need to wait for IO completion in this8484 * hook. Returns 0 for good, or a negative error value in case of8585- * error.8585+ * error. If not present all pages are considered good.8686 */8787 int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *);8888···195195static inline int pipe_buf_confirm(struct pipe_inode_info *pipe,196196 struct pipe_buffer *buf)197197{198198+ if (!buf->ops->confirm)199199+ return 0;198200 return buf->ops->confirm(pipe, buf);199201}200202···234232235233/* Generic pipe buffer ops functions */236234bool generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *);237237-int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *);238235int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *);239236void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *);240237