[akpm-mm:mm-unstable 208/262] lib/maple_tree.c:5506:25: error: no member named 'end' in 'struct ma_state'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   4d9256c0c56bafd76b8b1517916451e168fae495
commit: 84bda0b24555d3fdf52b56040696ee1ee00700c9 [208/262] maple_tree: do not preallocate nodes for slot stores
config: arm-defconfig (https://download.01.org/0day-ci/archive/20231214/202312140605.Er6kw8xG-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312140605.Er6kw8xG-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312140605.Er6kw8xG-lkp@xxxxxxxxx/

Note: the akpm-mm/mm-unstable HEAD 4d9256c0c56bafd76b8b1517916451e168fae495 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

>> lib/maple_tree.c:5506:25: error: no member named 'end' in 'struct ma_state'
           if ((node_size == mas->end) && ((!mt_in_rcu(mas->tree))
                             ~~~  ^
   1 error generated.


vim +5506 lib/maple_tree.c

  5465	
  5466	/**
  5467	 * mas_preallocate() - Preallocate enough nodes for a store operation
  5468	 * @mas: The maple state
  5469	 * @entry: The entry that will be stored
  5470	 * @gfp: The GFP_FLAGS to use for allocations.
  5471	 *
  5472	 * Return: 0 on success, -ENOMEM if memory could not be allocated.
  5473	 */
  5474	int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)
  5475	{
  5476		MA_WR_STATE(wr_mas, mas, entry);
  5477		unsigned char node_size;
  5478		int request = 1;
  5479		int ret;
  5480	
  5481	
  5482		if (unlikely(!mas->index && mas->last == ULONG_MAX))
  5483			goto ask_now;
  5484	
  5485		mas_wr_store_setup(&wr_mas);
  5486		wr_mas.content = mas_start(mas);
  5487		/* Root expand */
  5488		if (unlikely(mas_is_none(mas) || mas_is_ptr(mas)))
  5489			goto ask_now;
  5490	
  5491		if (unlikely(!mas_wr_walk(&wr_mas))) {
  5492			/* Spanning store, use worst case for now */
  5493			request = 1 + mas_mt_height(mas) * 3;
  5494			goto ask_now;
  5495		}
  5496	
  5497		/* At this point, we are at the leaf node that needs to be altered. */
  5498		/* Exact fit, no nodes needed. */
  5499		if (wr_mas.r_min == mas->index && wr_mas.r_max == mas->last)
  5500			return 0;
  5501	
  5502		mas_wr_end_piv(&wr_mas);
  5503		node_size = mas_wr_new_end(&wr_mas);
  5504	
  5505		/* Slot store, does not require additional nodes */
> 5506		if ((node_size == mas->end) && ((!mt_in_rcu(mas->tree))
  5507			|| (wr_mas.offset_end - mas->offset == 1)))
  5508			return 0;
  5509	
  5510		if (node_size >= mt_slots[wr_mas.type]) {
  5511			/* Split, worst case for now. */
  5512			request = 1 + mas_mt_height(mas) * 2;
  5513			goto ask_now;
  5514		}
  5515	
  5516		/* New root needs a singe node */
  5517		if (unlikely(mte_is_root(mas->node)))
  5518			goto ask_now;
  5519	
  5520		/* Potential spanning rebalance collapsing a node, use worst-case */
  5521		if (node_size  - 1 <= mt_min_slots[wr_mas.type])
  5522			request = mas_mt_height(mas) * 2 - 1;
  5523	
  5524		/* node store, slot store needs one node */
  5525	ask_now:
  5526		mas_node_count_gfp(mas, request, gfp);
  5527		mas->mas_flags |= MA_STATE_PREALLOC;
  5528		if (likely(!mas_is_err(mas)))
  5529			return 0;
  5530	
  5531		mas_set_alloc_req(mas, 0);
  5532		ret = xa_err(mas->node);
  5533		mas_reset(mas);
  5534		mas_destroy(mas);
  5535		mas_reset(mas);
  5536		return ret;
  5537	}
  5538	EXPORT_SYMBOL_GPL(mas_preallocate);
  5539	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux