From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: "Ricardo Cañuelo Navarro" <rcn@igalia.com>,
"Hugh Dickins" <hughd@google.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David Hildenbrand" <david@redhat.com>,
"Yosry Ahmed" <yosry.ahmed@linux.dev>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Davidlohr Bueso" <dave@stgolabs.net>
Cc: Christian Brauner <brauner@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Florent Revest <revest@chromium.org>,
kernel-dev@igalia.com, Pengfei Xu <pengfei.xu@intel.com>
Subject: Re: [PATCH] mm: shmem: remove unnecessary warning in shmem_writepage()
Date: Thu, 27 Feb 2025 12:50:49 +0800 [thread overview]
Message-ID: <eb7a13b1-7e31-4010-b35d-0f289ba3a799@linux.alibaba.com> (raw)
In-Reply-To: <20250226-20250221-warning-in-shmem_writepage-v1-1-5ad19420e17e@igalia.com>
On 2025/2/26 20:26, Ricardo Cañuelo Navarro wrote:
> Although the scenario where shmem_writepage() is called with info->flags
> & VM_LOCKED is unlikely to happen, it's still possible, as evidenced by
> syzbot [1]. However, the warning in this case isn't necessary because
> the situation is already handled correctly [2].
>
> [2] https://lore.kernel.org/lkml/8afe1f7f-31a2-4fc0-1fbd-f9ba8a116fe3@google.com/
>
> Reported-by: Pengfei Xu <pengfei.xu@intel.com>
> Closes: https://lore.kernel.org/lkml/ZZ9PShXjKJkVelNm@xpf.sh.intel.com/ [1]
> Suggested-by: Hugh Dickins <hughd@google.com>
> Cc: Florent Revest <revest@chromium.org>
> Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
> Fixes: 9a976f0c847b ("shmem: skip page split if we're not reclaiming")
> ---
LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> mm/shmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 4ea6109a80431e5eeae15278064d5c86412f9fc9..a5eaad03038e8ca56a54d096159892e01c7a5bfe 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -1548,7 +1548,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
> if (WARN_ON_ONCE(!wbc->for_reclaim))
> goto redirty;
>
> - if (WARN_ON_ONCE((info->flags & VM_LOCKED) || sbinfo->noswap))
> + if ((info->flags & VM_LOCKED) || sbinfo->noswap)
> goto redirty;
>
> if (!total_swap_pages)
>
> ---
> base-commit: ac9c34d1e45a4c25174ced4fc0cfc33ff3ed08c7
> change-id: 20250226-20250221-warning-in-shmem_writepage-e7f8f273317c
>
> Cheers,
> Ricardo
>
prev parent reply other threads:[~2025-02-27 5:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 12:26 Ricardo Cañuelo Navarro
2025-02-27 4:50 ` Baolin Wang [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=eb7a13b1-7e31-4010-b35d-0f289ba3a799@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=dave@stgolabs.net \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=pengfei.xu@intel.com \
--cc=rcn@igalia.com \
--cc=revest@chromium.org \
--cc=yosry.ahmed@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox