[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210224180942.GZ1993@twin.jikos.cz>
Date: Wed, 24 Feb 2021 19:09:42 +0100
From: David Sterba <dsterba@...e.cz>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Nikolay Borisov <nborisov@...e.com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 5.11 54/67] btrfs: make
btrfs_start_delalloc_root's nr argument a long
On Wed, Feb 24, 2021 at 07:50:12AM -0500, Sasha Levin wrote:
> From: Nikolay Borisov <nborisov@...e.com>
>
> [ Upstream commit 9db4dc241e87fccd8301357d5ef908f40b50f2e3 ]
>
> It's currently u64 which gets instantly translated either to LONG_MAX
> (if U64_MAX is passed) or cast to an unsigned long (which is in fact,
> wrong because writeback_control::nr_to_write is a signed, long type).
>
> Just convert the function's argument to be long time which obviates the
> need to manually convert u64 value to a long. Adjust all call sites
> which pass U64_MAX to pass LONG_MAX. Finally ensure that in
> shrink_delalloc the u64 is converted to a long without overflowing,
> resulting in a negative number.
This patch is a cleanup and I don't see any other patch depend on it, so
please drop it from autosel.
Powered by blists - more mailing lists