From: Jaegeuk Kim via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: llvm@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net,
kernel test robot <lkp@intel.com>,
oe-kbuild-all@lists.linux.dev
Subject: Re: [f2fs-dev] [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 16:49:58 +0000 [thread overview]
Message-ID: <aG_vNmvrnLGVCXzj@google.com> (raw)
In-Reply-To: <aG_ZQYONhf9UQJDq@casper.infradead.org>
On 07/10, Matthew Wilcox wrote:
> On Thu, Jul 10, 2025 at 02:26:38PM +0000, Jaegeuk Kim wrote:
> > 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);
> > }
>
> No, you can pass a mutable folio to a function which takes a const
> folio. Just not the other way around.
Ah, I found it. Applied the above missing change.
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=70e71e8a0099d27857fdb9178187e72513d72141
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
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 16:49:58 +0000 [thread overview]
Message-ID: <aG_vNmvrnLGVCXzj@google.com> (raw)
In-Reply-To: <aG_ZQYONhf9UQJDq@casper.infradead.org>
On 07/10, Matthew Wilcox wrote:
> On Thu, Jul 10, 2025 at 02:26:38PM +0000, Jaegeuk Kim wrote:
> > 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);
> > }
>
> No, you can pass a mutable folio to a function which takes a const
> folio. Just not the other way around.
Ah, I found it. Applied the above missing change.
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=70e71e8a0099d27857fdb9178187e72513d72141
next prev parent reply other threads:[~2025-07-10 16:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 7:17 [f2fs-dev] [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 7:17 ` kernel test robot
2025-07-10 13:57 ` [f2fs-dev] " Matthew Wilcox
2025-07-10 13:57 ` Matthew Wilcox
2025-07-10 14:26 ` [f2fs-dev] " Jaegeuk Kim via Linux-f2fs-devel
2025-07-10 14:26 ` Jaegeuk Kim
2025-07-10 15:16 ` [f2fs-dev] " Matthew Wilcox
2025-07-10 15:16 ` Matthew Wilcox
2025-07-10 16:49 ` Jaegeuk Kim via Linux-f2fs-devel [this message]
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_vNmvrnLGVCXzj@google.com \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=jaegeuk@kernel.org \
--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 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.