* [PATCH v2] fs: remove stale and duplicate forward declarations
@ 2026-02-26 20:18 Yuto Ohnuki
2026-02-27 15:41 ` Jan Kara
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yuto Ohnuki @ 2026-02-26 20:18 UTC (permalink / raw)
To: Jens Axboe, Alexander Viro, Christian Brauner, Jan Kara
Cc: linux-fsdevel, linux-kernel, linux-block, Yuto Ohnuki,
kernel test robot
Remove the following unnecessary forward declarations from fs.h, which
improves maintainability.
- struct hd_geometry: became unused in fs.h when
block_device_operations was moved to blkdev.h in commit 08f858512151
("[PATCH] move block_device_operations to blkdev.h"). The forward
declaration is now added to blkdev.h where it is actually used.
- struct iovec: became unused when aio_read/aio_write were removed in
commit 8436318205b9 ("->aio_read and ->aio_write removed")
- struct iov_iter: duplicate forward declaration. This removes the
redundant second declaration, added in commit 293bc9822fa9
("new methods: ->read_iter() and ->write_iter()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512301303.s7YWTZHA-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202512302139.Wl0soAlz-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202512302105.pmzYfmcV-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202512302125.FNgHwu5z-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202512302108.nIV8r5ES-lkp@intel.com/
Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
---
Changes in v2:
- Add forward declaration of struct hd_geometry to blkdev.h to fix
build errors reported by kernel test robot.
- Verified with allmodconfig build and all configs reported by
kernel test robot.
v1: https://lore.kernel.org/lkml/20251229071401.98146-1-ytohnuki@amazon.com/
---
include/linux/blkdev.h | 1 +
include/linux/fs.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index d463b9b5a0a5..0b5942e08754 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -38,6 +38,7 @@ struct blk_flush_queue;
struct kiocb;
struct pr_ops;
struct rq_qos;
+struct hd_geometry;
struct blk_report_zones_args;
struct blk_queue_stats;
struct blk_stat_callback;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8b3dd145b25e..75c97faf8799 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -55,8 +55,6 @@ struct bdi_writeback;
struct bio;
struct io_comp_batch;
struct fiemap_extent_info;
-struct hd_geometry;
-struct iovec;
struct kiocb;
struct kobject;
struct pipe_inode_info;
@@ -1917,7 +1915,6 @@ struct dir_context {
*/
#define COPY_FILE_SPLICE (1 << 0)
-struct iov_iter;
struct io_uring_cmd;
struct offset_ctx;
--
2.50.1
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] fs: remove stale and duplicate forward declarations
2026-02-26 20:18 [PATCH v2] fs: remove stale and duplicate forward declarations Yuto Ohnuki
@ 2026-02-27 15:41 ` Jan Kara
2026-03-20 10:13 ` Yuto Ohnuki
2026-03-20 13:18 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2026-02-27 15:41 UTC (permalink / raw)
To: Yuto Ohnuki
Cc: Jens Axboe, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel, linux-block, kernel test robot
On Thu 26-02-26 20:18:58, Yuto Ohnuki wrote:
> Remove the following unnecessary forward declarations from fs.h, which
> improves maintainability.
>
> - struct hd_geometry: became unused in fs.h when
> block_device_operations was moved to blkdev.h in commit 08f858512151
> ("[PATCH] move block_device_operations to blkdev.h"). The forward
> declaration is now added to blkdev.h where it is actually used.
>
> - struct iovec: became unused when aio_read/aio_write were removed in
> commit 8436318205b9 ("->aio_read and ->aio_write removed")
>
> - struct iov_iter: duplicate forward declaration. This removes the
> redundant second declaration, added in commit 293bc9822fa9
> ("new methods: ->read_iter() and ->write_iter()")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512301303.s7YWTZHA-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302139.Wl0soAlz-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302105.pmzYfmcV-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302125.FNgHwu5z-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302108.nIV8r5ES-lkp@intel.com/
> Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
Makes sense. Thanks. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> Changes in v2:
> - Add forward declaration of struct hd_geometry to blkdev.h to fix
> build errors reported by kernel test robot.
> - Verified with allmodconfig build and all configs reported by
> kernel test robot.
>
> v1: https://lore.kernel.org/lkml/20251229071401.98146-1-ytohnuki@amazon.com/
> ---
> include/linux/blkdev.h | 1 +
> include/linux/fs.h | 3 ---
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index d463b9b5a0a5..0b5942e08754 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -38,6 +38,7 @@ struct blk_flush_queue;
> struct kiocb;
> struct pr_ops;
> struct rq_qos;
> +struct hd_geometry;
> struct blk_report_zones_args;
> struct blk_queue_stats;
> struct blk_stat_callback;
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 8b3dd145b25e..75c97faf8799 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -55,8 +55,6 @@ struct bdi_writeback;
> struct bio;
> struct io_comp_batch;
> struct fiemap_extent_info;
> -struct hd_geometry;
> -struct iovec;
> struct kiocb;
> struct kobject;
> struct pipe_inode_info;
> @@ -1917,7 +1915,6 @@ struct dir_context {
> */
> #define COPY_FILE_SPLICE (1 << 0)
>
> -struct iov_iter;
> struct io_uring_cmd;
> struct offset_ctx;
>
> --
> 2.50.1
>
>
>
>
> Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
>
> Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
>
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] fs: remove stale and duplicate forward declarations
2026-02-26 20:18 [PATCH v2] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2026-02-27 15:41 ` Jan Kara
@ 2026-03-20 10:13 ` Yuto Ohnuki
2026-03-20 13:18 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Yuto Ohnuki @ 2026-03-20 10:13 UTC (permalink / raw)
To: Jens Axboe, Alexander Viro, Christian Brauner, Jan Kara
Cc: linux-fsdevel, linux-kernel, linux-block, kernel test robot
On Thu, Feb 26, 2026 at 08:18:58PM +0000, Yuto Ohnuki wrote:
> Remove the following unnecessary forward declarations from fs.h, which
> improves maintainability.
>
> - struct hd_geometry: became unused in fs.h when
> block_device_operations was moved to blkdev.h in commit 08f858512151
> ("[PATCH] move block_device_operations to blkdev.h"). The forward
> declaration is now added to blkdev.h where it is actually used.
>
> - struct iovec: became unused when aio_read/aio_write were removed in
> commit 8436318205b9 ("->aio_read and ->aio_write removed")
>
> - struct iov_iter: duplicate forward declaration. This removes the
> redundant second declaration, added in commit 293bc9822fa9
> ("new methods: ->read_iter() and ->write_iter()")
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512301303.s7YWTZHA-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302139.Wl0soAlz-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302105.pmzYfmcV-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302125.FNgHwu5z-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202512302108.nIV8r5ES-lkp@intel.com/
> Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
> ---
> Changes in v2:
> - Add forward declaration of struct hd_geometry to blkdev.h to fix
> build errors reported by kernel test robot.
> - Verified with allmodconfig build and all configs reported by
> kernel test robot.
>
> v1: https://lore.kernel.org/lkml/20251229071401.98146-1-ytohnuki@amazon.com/
> ---
> include/linux/blkdev.h | 1 +
> include/linux/fs.h | 3 ---
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index d463b9b5a0a5..0b5942e08754 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -38,6 +38,7 @@ struct blk_flush_queue;
> struct kiocb;
> struct pr_ops;
> struct rq_qos;
> +struct hd_geometry;
> struct blk_report_zones_args;
> struct blk_queue_stats;
> struct blk_stat_callback;
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 8b3dd145b25e..75c97faf8799 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -55,8 +55,6 @@ struct bdi_writeback;
> struct bio;
> struct io_comp_batch;
> struct fiemap_extent_info;
> -struct hd_geometry;
> -struct iovec;
> struct kiocb;
> struct kobject;
> struct pipe_inode_info;
> @@ -1917,7 +1915,6 @@ struct dir_context {
> */
> #define COPY_FILE_SPLICE (1 << 0)
>
> -struct iov_iter;
> struct io_uring_cmd;
> struct offset_ctx;
>
> --
> 2.50.1
>
>
>
>
> Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
>
> Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
>
>
>
Gentle ping on this patch.
It has a Reviewed-by from Jan Kara.
Please let me know if there is anythins else needed for this
to be applied.
Thanks,
Yuto
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] fs: remove stale and duplicate forward declarations
2026-02-26 20:18 [PATCH v2] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2026-02-27 15:41 ` Jan Kara
2026-03-20 10:13 ` Yuto Ohnuki
@ 2026-03-20 13:18 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2026-03-20 13:18 UTC (permalink / raw)
To: Yuto Ohnuki
Cc: Christian Brauner, linux-fsdevel, linux-kernel, linux-block,
kernel test robot, Jens Axboe, Alexander Viro, Jan Kara
On Thu, 26 Feb 2026 20:18:58 +0000, Yuto Ohnuki wrote:
> Remove the following unnecessary forward declarations from fs.h, which
> improves maintainability.
>
> - struct hd_geometry: became unused in fs.h when
> block_device_operations was moved to blkdev.h in commit 08f858512151
> ("[PATCH] move block_device_operations to blkdev.h"). The forward
> declaration is now added to blkdev.h where it is actually used.
>
> [...]
Applied to the vfs-7.1.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.1.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.1.misc
[1/1] fs: remove stale and duplicate forward declarations
https://git.kernel.org/vfs/vfs/c/3d6bb84f6bb3
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-20 13:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 20:18 [PATCH v2] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2026-02-27 15:41 ` Jan Kara
2026-03-20 10:13 ` Yuto Ohnuki
2026-03-20 13:18 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox