Now all instances of .confirm are set to generic_pipe_buf_confirm(). The method and the helper can be removed. Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx> --- fs/pipe.c | 18 ------------------ fs/splice.c | 4 ---- include/linux/pipe_fs_i.h | 18 +----------------- kernel/relay.c | 1 - kernel/trace/trace.c | 2 -- 5 files changed, 1 insertion(+), 42 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 4fc422f0dea8..47b41568b3fc 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -200,22 +200,6 @@ void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) EXPORT_SYMBOL(generic_pipe_buf_get); /** - * generic_pipe_buf_confirm - verify contents of the pipe buffer - * @info: the pipe that the buffer belongs to - * @buf: the buffer to confirm - * - * Description: - * This function does nothing, because the generic pipe code uses - * pages that are always good when inserted into the pipe. - */ -int generic_pipe_buf_confirm(struct pipe_inode_info *info, - struct pipe_buffer *buf) -{ - return 0; -} -EXPORT_SYMBOL(generic_pipe_buf_confirm); - -/** * generic_pipe_buf_release - put a reference to a &struct pipe_buffer * @pipe: the pipe that the buffer belongs to * @buf: the buffer to put a reference to @@ -232,7 +216,6 @@ EXPORT_SYMBOL(generic_pipe_buf_release); static const struct pipe_buf_operations anon_pipe_buf_ops = { .can_merge = 1, - .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, @@ -240,7 +223,6 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { static const struct pipe_buf_operations packet_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, diff --git a/fs/splice.c b/fs/splice.c index 0ecbe3011796..dc4648ba6e8d 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -95,7 +95,6 @@ static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe, const struct pipe_buf_operations page_cache_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = page_cache_pipe_buf_release, .steal = page_cache_pipe_buf_steal, .get = generic_pipe_buf_get, @@ -113,7 +112,6 @@ static int user_page_pipe_buf_steal(struct pipe_inode_info *pipe, static const struct pipe_buf_operations user_page_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = page_cache_pipe_buf_release, .steal = user_page_pipe_buf_steal, .get = generic_pipe_buf_get, @@ -507,7 +505,6 @@ EXPORT_SYMBOL(generic_file_splice_read); static const struct pipe_buf_operations default_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = generic_pipe_buf_release, .steal = generic_pipe_buf_steal, .get = generic_pipe_buf_get, @@ -522,7 +519,6 @@ static int generic_pipe_buf_nosteal(struct pipe_inode_info *pipe, /* Pipe buffer operations for a socket and similar. */ const struct pipe_buf_operations nosteal_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = generic_pipe_buf_release, .steal = generic_pipe_buf_nosteal, .get = generic_pipe_buf_get, diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index e7497c9dde7f..ae9d87ea95cb 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -62,12 +62,6 @@ struct pipe_inode_info { }; /* - * Note on the nesting of these functions: - * - * ->confirm() - * ->steal() - * - * That is, ->steal() must be called on a confirmed buffer. * See below for the meaning of each operation. Also see kerneldoc * in fs/pipe.c for the pipe and generic variants of these hooks. */ @@ -80,15 +74,6 @@ struct pipe_buf_operations { int can_merge; /* - * ->confirm() verifies that the data in the pipe buffer is there - * and that the contents are good. If the pages in the pipe belong - * to a file system, we may need to wait for IO completion in this - * hook. Returns 0 for good, or a negative error value in case of - * error. - */ - int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *); - - /* * When the contents of this pipe buffer has been completely * consumed by a reader, ->release() is called. */ @@ -143,7 +128,7 @@ static inline void pipe_buf_release(struct pipe_inode_info *pipe, static inline int pipe_buf_confirm(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { - return buf->ops->confirm(pipe, buf); + return 0; } /** @@ -179,7 +164,6 @@ void free_pipe_info(struct pipe_inode_info *); /* Generic pipe buffer ops functions */ void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); -int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); void generic_pipe_buf_release(struct pipe_inode_info *, struct pipe_buffer *); diff --git a/kernel/relay.c b/kernel/relay.c index d797502140b9..da954ce520b2 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -1223,7 +1223,6 @@ static void relay_pipe_buf_release(struct pipe_inode_info *pipe, static const struct pipe_buf_operations relay_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = relay_pipe_buf_release, .steal = generic_pipe_buf_steal, .get = generic_pipe_buf_get, diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index dade4c9559cc..bdf891c78708 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5219,7 +5219,6 @@ static void tracing_spd_release_pipe(struct splice_pipe_desc *spd, static const struct pipe_buf_operations tracing_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = generic_pipe_buf_release, .steal = generic_pipe_buf_steal, .get = generic_pipe_buf_get, @@ -6114,7 +6113,6 @@ static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, /* Pipe buffer operations for a buffer. */ static const struct pipe_buf_operations buffer_pipe_buf_ops = { .can_merge = 0, - .confirm = generic_pipe_buf_confirm, .release = buffer_pipe_buf_release, .steal = generic_pipe_buf_steal, .get = buffer_pipe_buf_get, -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html