From: Steven Rostedt <rostedt@goodmis.org>
To: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set
Date: Tue, 3 Jun 2025 10:29:59 -0400 [thread overview]
Message-ID: <20250603102959.20c85adb@gandalf.local.home> (raw)
In-Reply-To: <fc2b6a94-bd2d-a5d9-c935-381a1613f47e@google.com>
On Tue, 3 Jun 2025 01:02:36 -0700 (PDT)
Hugh Dickins <hughd@google.com> wrote:
> Agreed that ramfs does not use swap, so calling swap_writepage() would
> be weird. But, thanks for the build fix Steve, but it cannot be right
> because return 0 says shmem_writeout() successfully sent the page to
> swap, and that has unlocked the page (or soon will do so). It should
> return an error (-ENXIO?), but I haven't checked what the callers do with
Yeah, I figured it should return an error, but looking at the code I
couldn't figure out what the proper error would be. Then I also noticed
that the other stub functions just returned zero so I did the same.
Perhaps add a WARN_ON_ONCE() if it is called without CONFIG_SHMEM configured?
> that, nor whether they need the folio to be redirtied. And wouldn't it
> need an EXPORT like the real one? Sorry, can't keep up, there are many
> many things I should have looked at but have not... Tomorrow?
Yeah, it probably needs an export as well.
Note, if you come up with a solution, by all means use it and don't use my
patch. I'm happy with a "Reported-by" and don't need to be the author. This
is the "fix" I'm using so that I can test my code because without it, my
tests fail.
I'm also happy to send another update if it's simple.
-- Steve
next prev parent reply other threads:[~2025-06-03 14:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 21:05 Steven Rostedt
2025-06-02 21:14 ` Steven Rostedt
2025-06-02 21:46 ` Matthew Wilcox
2025-06-03 8:02 ` Hugh Dickins
2025-06-03 14:29 ` Steven Rostedt [this message]
2025-06-03 16:26 ` Matthew Wilcox
2025-06-03 17:27 ` Steven Rostedt
2025-06-03 17:54 ` Linus Torvalds
2025-06-03 18:06 ` Steven Rostedt
2025-06-04 7:03 ` Hugh Dickins
2025-06-04 12:04 ` Steven Rostedt
2025-06-04 12:18 ` Thomas Hellström
2025-06-04 12:23 ` Steven Rostedt
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=20250603102959.20c85adb@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/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