All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Huang Shijie" <huangsj@hygon.cn>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/3] mm: use get_i_mmap_root to access the file's i_mmap
Date: Mon, 13 Apr 2026 06:44:30 +0000	[thread overview]
Message-ID: <20260413064431.12603C116C6@smtp.kernel.org> (raw)
In-Reply-To: <20260413062042.804-3-huangsj@hygon.cn>

Sashiko AI review found 1 potential issue(s):
- [Low] Compilation error in mm/nommu.c due to incorrect struct inode member access.
--

commit e38eaf1de7eaee855cd4763bac9c006d3d26fa76
Author: Huang Shijie <huangsj@hygon.cn>

mm: use get_i_mmap_root to access the file's i_mmap

This commit introduces get_i_mmap_root() to access the i_mmap interval tree 
in struct address_space and refactors multiple architectures and subsystems 
to use this new helper.

> diff --git a/mm/nommu.c b/mm/nommu.c
> index ed3934bc2de48..418c8c91689df 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c

[ ... ]

> @@ -1804,6 +1804,7 @@ EXPORT_SYMBOL_GPL(copy_remote_vm_str);
>  int nommu_shrink_inode_mappings(struct inode *inode, size_t size,
>  				size_t newsize)
>  {
> +	struct rb_root_cached *root = get_i_mmap_root(&inode->mapping);

Does this cause a compilation error for nommu configurations? It looks like
struct inode uses the member name i_mapping, rather than mapping.

Also, since i_mapping is a pointer to an address_space, taking its address
with the & operator passes a pointer-to-pointer, whereas get_i_mmap_root()
expects a struct address_space *. Could this be updated to use
get_i_mmap_root(inode->i_mapping) instead?

>  	struct vm_area_struct *vma;
>  	struct vm_region *region;
>  	pgoff_t low, high;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260413062042.804-1-huangsj@hygon.cn?part=2

  reply	other threads:[~2026-04-13  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13  6:20 [PATCH 0/3] mm: split the file's i_mmap tree for NUMA Huang Shijie
2026-04-13  6:20 ` [PATCH 1/3] mm: use mapping_mapped to simplify the code Huang Shijie
2026-04-13  6:20 ` [PATCH 2/3] mm: use get_i_mmap_root to access the file's i_mmap Huang Shijie
2026-04-13  6:44   ` sashiko-bot [this message]
2026-04-13  6:55     ` Huang Shijie
2026-04-13  6:20 ` [PATCH 3/3] mm: split the file's i_mmap tree for NUMA Huang Shijie
2026-04-13  7:25   ` sashiko-bot
2026-04-13 15:33 ` [PATCH 0/3] " Mateusz Guzik
2026-04-14  9:11   ` Huang Shijie
2026-04-16 10:29     ` Mateusz Guzik
2026-04-16 11:48       ` Huang Shijie
2026-04-17  6:59   ` Huang Shijie
2026-04-20  2:10   ` Huang Shijie
2026-04-20 13:48     ` Pedro Falcato
2026-04-21  3:06       ` Huang Shijie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260413064431.12603C116C6@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=huangsj@hygon.cn \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.