From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: kernel test robot <lkp@intel.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers
Date: Thu, 10 Jul 2025 14:26:38 +0000 [thread overview]
Message-ID: <aG_NntbzliX0WUGB@google.com> (raw)
In-Reply-To: <aG_Gr8NvCiXC4SyU@casper.infradead.org>
On 07/10, Matthew Wilcox wrote:
> On Thu, Jul 10, 2025 at 03:17:28PM +0800, kernel test robot wrote:
> > >> fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> > 58 | return folio_test_f2fs_gcing(fscrypt_pagecache_folio(folio));
> > | ^~~~~
> > include/linux/fscrypt.h:527:67: note: passing argument to parameter 'bounce_folio' here
> > 527 | static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
>
> Ah; I changed only one of the definitions of fscrypt_pagecache_folio.
>
> Jaegeuk, can you fold in this fix?
Will this break ext4?
In ext4,
struct folio *folio = fi.folio;
...
if (fscrypt_is_bounce_folio(folio)) {
io_folio = folio;
folio = fscrypt_pagecache_folio(folio);
}
>
> diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
> index b334c0538864..8d9127a0fdb3 100644
> --- a/include/linux/fscrypt.h
> +++ b/include/linux/fscrypt.h
> @@ -524,7 +524,8 @@ static inline bool fscrypt_is_bounce_folio(const struct folio *folio)
> return false;
> }
>
> -static inline struct folio *fscrypt_pagecache_folio(struct folio *bounce_folio)
> +static inline
> +struct folio *fscrypt_pagecache_folio(const struct folio *bounce_folio)
> {
> WARN_ON_ONCE(1);
> return ERR_PTR(-EINVAL);
next prev parent reply other threads:[~2025-07-10 14:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 7:17 [jaegeuk-f2fs:dev-test 65/93] fs/f2fs/data.c:58:56: error: passing 'const struct folio *' to parameter of type 'struct folio *' discards qualifiers kernel test robot
2025-07-10 13:57 ` Matthew Wilcox
2025-07-10 14:26 ` Jaegeuk Kim [this message]
2025-07-10 15:16 ` Matthew Wilcox
2025-07-10 16:49 ` Jaegeuk Kim
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=aG_NntbzliX0WUGB@google.com \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).