提交 6e552494 编写于 作者: B Brian Foster 提交者: Darrick J. Wong

iomap: remove unused private field from ioend

The only remaining user of ->io_private is the generic ioend merging
infrastructure. The only user of that is XFS, which no longer sets
->io_private or passes an associated merge callback. Remove the
unused parameter and the ->io_private field.

CC: linux-fsdevel@vger.kernel.org
Signed-off-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
上级 5e321ded
...@@ -1134,9 +1134,7 @@ iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next) ...@@ -1134,9 +1134,7 @@ iomap_ioend_can_merge(struct iomap_ioend *ioend, struct iomap_ioend *next)
} }
void void
iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends)
void (*merge_private)(struct iomap_ioend *ioend,
struct iomap_ioend *next))
{ {
struct iomap_ioend *next; struct iomap_ioend *next;
...@@ -1148,8 +1146,6 @@ iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends, ...@@ -1148,8 +1146,6 @@ iomap_ioend_try_merge(struct iomap_ioend *ioend, struct list_head *more_ioends,
break; break;
list_move_tail(&next->io_list, &ioend->io_list); list_move_tail(&next->io_list, &ioend->io_list);
ioend->io_size += next->io_size; ioend->io_size += next->io_size;
if (next->io_private && merge_private)
merge_private(ioend, next);
} }
} }
EXPORT_SYMBOL_GPL(iomap_ioend_try_merge); EXPORT_SYMBOL_GPL(iomap_ioend_try_merge);
...@@ -1236,7 +1232,6 @@ iomap_alloc_ioend(struct inode *inode, struct iomap_writepage_ctx *wpc, ...@@ -1236,7 +1232,6 @@ iomap_alloc_ioend(struct inode *inode, struct iomap_writepage_ctx *wpc,
ioend->io_inode = inode; ioend->io_inode = inode;
ioend->io_size = 0; ioend->io_size = 0;
ioend->io_offset = offset; ioend->io_offset = offset;
ioend->io_private = NULL;
ioend->io_bio = bio; ioend->io_bio = bio;
return ioend; return ioend;
} }
......
...@@ -146,7 +146,7 @@ xfs_end_io( ...@@ -146,7 +146,7 @@ xfs_end_io(
while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend, while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend,
io_list))) { io_list))) {
list_del_init(&ioend->io_list); list_del_init(&ioend->io_list);
iomap_ioend_try_merge(ioend, &tmp, NULL); iomap_ioend_try_merge(ioend, &tmp);
xfs_end_ioend(ioend); xfs_end_ioend(ioend);
} }
} }
......
...@@ -198,7 +198,6 @@ struct iomap_ioend { ...@@ -198,7 +198,6 @@ struct iomap_ioend {
struct inode *io_inode; /* file being written to */ struct inode *io_inode; /* file being written to */
size_t io_size; /* size of the extent */ size_t io_size; /* size of the extent */
loff_t io_offset; /* offset in the file */ loff_t io_offset; /* offset in the file */
void *io_private; /* file system private data */
struct bio *io_bio; /* bio being built */ struct bio *io_bio; /* bio being built */
struct bio io_inline_bio; /* MUST BE LAST! */ struct bio io_inline_bio; /* MUST BE LAST! */
}; };
...@@ -234,9 +233,7 @@ struct iomap_writepage_ctx { ...@@ -234,9 +233,7 @@ struct iomap_writepage_ctx {
void iomap_finish_ioends(struct iomap_ioend *ioend, int error); void iomap_finish_ioends(struct iomap_ioend *ioend, int error);
void iomap_ioend_try_merge(struct iomap_ioend *ioend, void iomap_ioend_try_merge(struct iomap_ioend *ioend,
struct list_head *more_ioends, struct list_head *more_ioends);
void (*merge_private)(struct iomap_ioend *ioend,
struct iomap_ioend *next));
void iomap_sort_ioends(struct list_head *ioend_list); void iomap_sort_ioends(struct list_head *ioend_list);
int iomap_writepage(struct page *page, struct writeback_control *wbc, int iomap_writepage(struct page *page, struct writeback_control *wbc,
struct iomap_writepage_ctx *wpc, struct iomap_writepage_ctx *wpc,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册