From: Chao Yu <chao@kernel.org>
To: Gao Xiang <xiang@kernel.org>, linux-erofs@lists.ozlabs.org
Cc: chao@kernel.org, LKML <linux-kernel@vger.kernel.org>,
YoungWoo Rim <xsapiens75@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] erofs: hold real inodes for shared files
Date: Sun, 25 Oct 2026 10:21:20 +0800 [thread overview]
Message-ID: <22cd38be-5f6e-45e6-8042-9ad091089192@kernel.org> (raw)
In-Reply-To: <20261024192028.53932-1-xiang@kernel.org>
On 10/25/26 03:20, Gao Xiang wrote:
> EROFS page cache sharing uses shared inodes. However, a mmaped VMA
> keeps the shared file even after the corresponding fd is closed, while
> currently the real inode is never held by any reference associated
> with the shared file.
>
> As a result, the real inode could be evicted and removed from the
> shared inode's list while the page fault can still invoke on the
> shared inode's address space, which causes no candidate is
> successfully acquired by erofs_real_inode().
>
> Fix this by simply keeping the original inode in the shared backing
> file's private data.
>
> Also replace confusing "readinode"/"rf" names with "sf" (sharedfile)
> to unify the terms as well as nullify realinode in erofs_real_inode()
> to avoid returning an uninitialized pointer.
>
> Fixes: 5ef3208e3be5 ("erofs: introduce the page cache share feature")
> Reported-by: YoungWoo Rim <xsapiens75@gmail.com>
> Closes: https://lore.kernel.org/r/atzSVuvqYKgmvDmO@MacBookPro
> Cc: stable@vger.kernel.org # 7.0+
> Signed-off-by: Gao Xiang (Docker) <xiang@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
prev parent reply other threads:[~2026-10-25 2:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 19:20 [PATCH] erofs: hold real inodes for shared files Gao Xiang
2026-10-25 2:21 ` Chao Yu [this message]
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=22cd38be-5f6e-45e6-8042-9ad091089192@kernel.org \
--to=chao@kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xiang@kernel.org \
--cc=xsapiens75@gmail.com \
/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.