From: David Sterba <dsterba@suse.cz>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>,
Arnd Bergmann <arnd@arndb.de>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Filipe Manana <fdmanana@suse.com>, Li Zetao <lizetao1@huawei.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix signedness issue in min()
Date: Fri, 14 Mar 2025 19:26:43 +0100 [thread overview]
Message-ID: <20250314182643.GS32661@twin.jikos.cz> (raw)
In-Reply-To: <20250314155447.124842-1-arnd@kernel.org>
On Fri, Mar 14, 2025 at 04:54:41PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Comparing a u64 to an loff_t causes a warning in min()
>
> fs/btrfs/extent_io.c: In function 'extent_write_locked_range':
> include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_588' declared with attribute error: min(folio_pos(folio) + folio_size(folio) - 1, end) signedness error
> fs/btrfs/extent_io.c:2472:27: note: in expansion of macro 'min'
> 2472 | cur_end = min(folio_pos(folio) + folio_size(folio) - 1, end);
> | ^~~
>
> Use min_t() instead.
>
> Fixes: f286b1c72175 ("btrfs: prepare extent_io.c for future larger folio support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, there was another report and the upcoming for-next will have it
fixed.
next prev parent reply other threads:[~2025-03-14 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 15:54 [PATCH] btrfs: fix signedness issue in min() Arnd Bergmann
2025-03-14 18:26 ` David Sterba [this message]
2025-03-17 14:16 ` David Laight
2025-03-17 19:26 ` David Sterba
2025-03-19 12:40 ` David Laight
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=20250314182643.GS32661@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizetao1@huawei.com \
--cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox