fs/xfs/scrub/common.h | 1 - fs/xfs/scrub/scrub.h | 1 - fs/xfs/scrub/tempfile.h | 4 ---- fs/xfs/xfs_buf_item.h | 1 - fs/xfs/xfs_inode.h | 1 - fs/xfs/xfs_log.h | 2 -- fs/xfs/xfs_platform.h | 11 ----------- 7 files changed, 21 deletions(-)
While reading the XFS log code I noticed that the implementation of xlog_assign_tail_lsn() had already been removed, but its declaration was left behind in the header. Such orphaned declarations (implementation gone, no callers) can simply be dropped. Suspecting more of these existed, I scanned the XFS headers (using GLM-5.2 to help, then verified each by hand) and this series removes the leftover declarations I could confirm. Some of these have been stale for a long time -- the oldest dates back to 2006. Note that scrub still has a fair number of functions that do have implementations but no callers (e.g. xchk_process_rt_error). I'm not sure removing those is appropriate, since they may be intended for future use, so they are not touched here. Cleanup only, no functional change. Zizhi Wo (5): xfs: remove unused xlog_assign_tail_lsn declarations xfs: remove unused xfs_iext_realloc declaration xfs: remove unused xfs_buf_iodone declaration xfs: remove unused kmem_to_page helper xfs: remove never-implemented scrub declarations fs/xfs/scrub/common.h | 1 - fs/xfs/scrub/scrub.h | 1 - fs/xfs/scrub/tempfile.h | 4 ---- fs/xfs/xfs_buf_item.h | 1 - fs/xfs/xfs_inode.h | 1 - fs/xfs/xfs_log.h | 2 -- fs/xfs/xfs_platform.h | 11 ----------- 7 files changed, 21 deletions(-) -- 2.52.0
On Fri, Sep 04, 2026 at 02:06:43PM +0800, Zizhi Wo wrote: > While reading the XFS log code I noticed that the implementation of > xlog_assign_tail_lsn() had already been removed, but its declaration was > left behind in the header. Such orphaned declarations (implementation gone, > no callers) can simply be dropped. > > Suspecting more of these existed, I scanned the XFS headers (using GLM-5.2 > to help, then verified each by hand) and this series removes the leftover > declarations I could confirm. Some of these have been stale for a long time > -- the oldest dates back to 2006. > > Note that scrub still has a fair number of functions that do have > implementations but no callers (e.g. xchk_process_rt_error). I'm not sure > removing those is appropriate, since they may be intended for future use, > so they are not touched here. > > Cleanup only, no functional change. Looks fine to me, Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> --D > > Zizhi Wo (5): > xfs: remove unused xlog_assign_tail_lsn declarations > xfs: remove unused xfs_iext_realloc declaration > xfs: remove unused xfs_buf_iodone declaration > xfs: remove unused kmem_to_page helper > xfs: remove never-implemented scrub declarations > > fs/xfs/scrub/common.h | 1 - > fs/xfs/scrub/scrub.h | 1 - > fs/xfs/scrub/tempfile.h | 4 ---- > fs/xfs/xfs_buf_item.h | 1 - > fs/xfs/xfs_inode.h | 1 - > fs/xfs/xfs_log.h | 2 -- > fs/xfs/xfs_platform.h | 11 ----------- > 7 files changed, 21 deletions(-) > > -- > 2.52.0 >
On Fri, Sep 04, 2026 at 02:06:43PM +0800, Zizhi Wo wrote: > While reading the XFS log code I noticed that the implementation of > xlog_assign_tail_lsn() had already been removed, but its declaration was > left behind in the header. Such orphaned declarations (implementation gone, > no callers) can simply be dropped. > > Suspecting more of these existed, I scanned the XFS headers (using GLM-5.2 > to help, then verified each by hand) and this series removes the leftover > declarations I could confirm. Some of these have been stale for a long time > -- the oldest dates back to 2006. > > Note that scrub still has a fair number of functions that do have > implementations but no callers (e.g. xchk_process_rt_error). I'm not sure > removing those is appropriate, since they may be intended for future use, > so they are not touched here. > > Cleanup only, no functional change. > > Zizhi Wo (5): > xfs: remove unused xlog_assign_tail_lsn declarations > xfs: remove unused xfs_iext_realloc declaration > xfs: remove unused xfs_buf_iodone declaration > xfs: remove unused kmem_to_page helper > xfs: remove never-implemented scrub declarations Honestly this all could have been a single patch, I don't believe the 'when the last user was gone' matters at least for me as I could find if through a quick `git log` scan. Darrick was fine with it so I won't enforce it to be a single cleanup patch. At least get rid of the "Assisted-By: <model>" thing and send a new version as we don't accept models discrimination anymore. Carlos > > fs/xfs/scrub/common.h | 1 - > fs/xfs/scrub/scrub.h | 1 - > fs/xfs/scrub/tempfile.h | 4 ---- > fs/xfs/xfs_buf_item.h | 1 - > fs/xfs/xfs_inode.h | 1 - > fs/xfs/xfs_log.h | 2 -- > fs/xfs/xfs_platform.h | 11 ----------- > 7 files changed, 21 deletions(-) > > -- > 2.52.0 > >
在 2026/9/4 23:24, Carlos Maiolino 写道: > On Fri, Sep 04, 2026 at 02:06:43PM +0800, Zizhi Wo wrote: >> While reading the XFS log code I noticed that the implementation of >> xlog_assign_tail_lsn() had already been removed, but its declaration was >> left behind in the header. Such orphaned declarations (implementation gone, >> no callers) can simply be dropped. >> >> Suspecting more of these existed, I scanned the XFS headers (using GLM-5.2 >> to help, then verified each by hand) and this series removes the leftover >> declarations I could confirm. Some of these have been stale for a long time >> -- the oldest dates back to 2006. >> >> Note that scrub still has a fair number of functions that do have >> implementations but no callers (e.g. xchk_process_rt_error). I'm not sure >> removing those is appropriate, since they may be intended for future use, >> so they are not touched here. >> >> Cleanup only, no functional change. >> >> Zizhi Wo (5): >> xfs: remove unused xlog_assign_tail_lsn declarations >> xfs: remove unused xfs_iext_realloc declaration >> xfs: remove unused xfs_buf_iodone declaration >> xfs: remove unused kmem_to_page helper >> xfs: remove never-implemented scrub declarations > Hi Carlos, Thanks a lot for the review. > Honestly this all could have been a single patch, I don't believe the > 'when the last user was gone' matters at least for me as I could find if > through a quick `git log` scan. Darrick was fine with it so I won't > enforce it to be a single cleanup patch. > My original intent behind splitting was to keep each removal in its own commit, so that during review one could tell directly from the commit message why each symbol was left behind, without having to dig through the history separately -- even though every change is tiny. But I agree that a quick `git log` scan serves the same purpose, so I'll fold them into a single cleanup patch in v2. > At least get rid of the "Assisted-By: <model>" thing and send a new > version as we don't accept models discrimination anymore. > > Carlos > Sure, I'll drop the "Assisted-By:" tag as well. Will send v2 shortly. Thanks, Zizhi Wo >> >> fs/xfs/scrub/common.h | 1 - >> fs/xfs/scrub/scrub.h | 1 - >> fs/xfs/scrub/tempfile.h | 4 ---- >> fs/xfs/xfs_buf_item.h | 1 - >> fs/xfs/xfs_inode.h | 1 - >> fs/xfs/xfs_log.h | 2 -- >> fs/xfs/xfs_platform.h | 11 ----------- >> 7 files changed, 21 deletions(-) >> >> -- >> 2.52.0 >> >>
© 2016 - 2026 Red Hat, Inc.