[djwong-xfs:vectorized-scrub 243/358] fs/xfs/libxfs/xfs_alloc.c:2581:37: error: 'mp' undeclared; did you mean 'tp'?
From: kernel test robot
Date: Thu Aug 26 2021 - 05:22:14 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: f7b5acb4dc5e8a3845296b4662732360360b776e
commit: d76394b9f294ec6802b5d9da847041e6d5cce142 [243/358] xfs: clean up extent free log intent item tracepoint callsites
config: h8300-randconfig-r022-20210826 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=d76394b9f294ec6802b5d9da847041e6d5cce142
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs vectorized-scrub
git checkout d76394b9f294ec6802b5d9da847041e6d5cce142
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash fs/xfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/string.h:5,
from include/linux/uuid.h:12,
from fs/xfs/xfs_linux.h:10,
from fs/xfs/xfs.h:22,
from fs/xfs/libxfs/xfs_alloc.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:9: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:17: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
fs/xfs/libxfs/xfs_alloc.c: In function 'xfs_free_extent_later':
>> fs/xfs/libxfs/xfs_alloc.c:2581:37: error: 'mp' undeclared (first use in this function); did you mean 'tp'?
2581 | trace_xfs_extent_free_defer(mp, XFS_FREE_EXTENT_REGULAR, new);
| ^~
| tp
fs/xfs/libxfs/xfs_alloc.c:2581:37: note: each undeclared identifier is reported only once for each function it appears in
vim +2581 fs/xfs/libxfs/xfs_alloc.c
2539
2540 /*
2541 * Add the extent to the list of extents to be free at transaction end.
2542 * The list is maintained sorted (by block number).
2543 */
2544 void
2545 xfs_free_extent_later(
2546 struct xfs_trans *tp,
2547 xfs_fsblock_t bno,
2548 xfs_filblks_t len,
2549 const struct xfs_owner_info *oinfo,
2550 bool skip_discard)
2551 {
2552 struct xfs_extent_free_item *new; /* new element */
2553 #ifdef DEBUG
2554 struct xfs_mount *mp = tp->t_mountp;
2555 xfs_agnumber_t agno;
2556 xfs_agblock_t agbno;
2557
2558 ASSERT(bno != NULLFSBLOCK);
2559 ASSERT(len > 0);
2560 ASSERT(len <= MAXEXTLEN);
2561 ASSERT(!isnullstartblock(bno));
2562 agno = XFS_FSB_TO_AGNO(mp, bno);
2563 agbno = XFS_FSB_TO_AGBNO(mp, bno);
2564 ASSERT(agno < mp->m_sb.sb_agcount);
2565 ASSERT(agbno < mp->m_sb.sb_agblocks);
2566 ASSERT(len < mp->m_sb.sb_agblocks);
2567 ASSERT(agbno + len <= mp->m_sb.sb_agblocks);
2568 #endif
2569 ASSERT(xfs_extent_free_item_zone != NULL);
2570
2571 new = kmem_cache_alloc(xfs_extent_free_item_zone,
2572 GFP_KERNEL | __GFP_NOFAIL);
2573 new->xefi_startblock = bno;
2574 new->xefi_blockcount = (xfs_extlen_t)len;
2575 if (oinfo)
2576 new->xefi_oinfo = *oinfo;
2577 else
2578 new->xefi_oinfo = XFS_RMAP_OINFO_SKIP_UPDATE;
2579 new->xefi_skip_discard = skip_discard;
2580
> 2581 trace_xfs_extent_free_defer(mp, XFS_FREE_EXTENT_REGULAR, new);
2582 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_FREE, &new->xefi_list);
2583 }
2584
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip