Skip to content

Commit 3d6bb84

Browse files
Yuto Ohnukibrauner
authored andcommitted
fs: remove stale and duplicate forward declarations
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 08f8585 ("[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 8436318 ("->aio_read and ->aio_write removed") - struct iov_iter: duplicate forward declaration. This removes the redundant second declaration, added in commit 293bc98 ("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> Link: https://patch.msgid.link/20260226201857.27310-2-ytohnuki@amazon.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 49e64d7 commit 3d6bb84

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

include/linux/blkdev.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct blk_flush_queue;
3838
struct kiocb;
3939
struct pr_ops;
4040
struct rq_qos;
41+
struct hd_geometry;
4142
struct blk_report_zones_args;
4243
struct blk_queue_stats;
4344
struct blk_stat_callback;

include/linux/fs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ struct bdi_writeback;
5555
struct bio;
5656
struct io_comp_batch;
5757
struct fiemap_extent_info;
58-
struct hd_geometry;
59-
struct iovec;
6058
struct kiocb;
6159
struct kobject;
6260
struct pipe_inode_info;
@@ -1917,7 +1915,6 @@ struct dir_context {
19171915
*/
19181916
#define COPY_FILE_SPLICE (1 << 0)
19191917

1920-
struct iov_iter;
19211918
struct io_uring_cmd;
19221919
struct offset_ctx;
19231920

0 commit comments

Comments
 (0)