oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [anolis-intel-cloud:devel-5.10 11/11] fs/xfs/xfs_mount.c:1087:1: warning: no previous prototype for function 'xfs_atomic_staging_cancel_all'
@ 2025-05-17 23:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-17 23:38 UTC (permalink / raw)
  To: aubrey.li; +Cc: oe-kbuild-all

tree:   https://gitee.com/anolis/intel-cloud-kernel.git devel-5.10
head:   950b90b563b8c87ae35bb6edc4775609bc9471c2
commit: bb45aa897d6fc9eb24c04228746be0f10ed3b356 [11/11] anolis: xfs: release atomic staging extents when unmounting
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250518/202505180741.Vstkf9s9-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.58.0 (02072b482 2022-01-11)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250518/202505180741.Vstkf9s9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505180741.Vstkf9s9-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_mount.c:1087:1: warning: no previous prototype for function 'xfs_atomic_staging_cancel_all' [-Wmissing-prototypes]
    1087 | xfs_atomic_staging_cancel_all(
         | ^
   fs/xfs/xfs_mount.c:1086:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1086 | void
         | ^
         | static 
   1 warning generated.


vim +/xfs_atomic_staging_cancel_all +1087 fs/xfs/xfs_mount.c

  1085	
  1086	void
> 1087	xfs_atomic_staging_cancel_all(
  1088		struct xfs_mount	*mp)
  1089	{
  1090		xfs_agnumber_t		agno;
  1091	
  1092		for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
  1093			struct xfs_perag *pag = xfs_perag_get(mp, agno);
  1094			struct xfs_trans *tp = NULL;
  1095	
  1096			while (1) {
  1097				struct xfs_atomic_staging *as;
  1098				int error;
  1099	
  1100				spin_lock(&pag->atomic_staging_lock);
  1101				as = pag->atomic_staging;
  1102				if (!as) {
  1103					spin_unlock(&pag->atomic_staging_lock);
  1104					break;
  1105				}
  1106				pag->atomic_staging = as->next;
  1107				spin_unlock(&pag->atomic_staging_lock);
  1108	
  1109				if (!tp) {
  1110					/* Start a rolling transaction to remove the mappings */
  1111					error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write,
  1112								0, 0, 0, &tp);
  1113					if (error)
  1114						break;
  1115				}
  1116	
  1117				while (as->aglen) {
  1118					xfs_fsblock_t fsbno =
  1119						XFS_AGB_TO_FSB(mp, agno, as->agbno);
  1120	
  1121					xfs_refcount_free_cow_extent(tp, fsbno,
  1122							XFS_ATOMIC_WRITE_EXTSZ_HINT);
  1123					as->agbno += XFS_ATOMIC_WRITE_EXTSZ_HINT;
  1124					as->aglen -= XFS_ATOMIC_WRITE_EXTSZ_HINT;
  1125				}
  1126				kfree(as);
  1127			}
  1128			if (tp)
  1129				xfs_trans_commit(tp);
  1130			xfs_perag_put(pag);
  1131		}
  1132	}
  1133	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-17 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-17 23:38 [anolis-intel-cloud:devel-5.10 11/11] fs/xfs/xfs_mount.c:1087:1: warning: no previous prototype for function 'xfs_atomic_staging_cancel_all' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).