lkml.org 
[lkml]   [2021]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH AUTOSEL 5.11 54/67] btrfs: make btrfs_start_delalloc_root's nr argument a long
On Wed, Feb 24, 2021 at 07:09:42PM +0100, David Sterba wrote:
>On Wed, Feb 24, 2021 at 07:50:12AM -0500, Sasha Levin wrote:
>> From: Nikolay Borisov <nborisov@suse.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.

I'll drop it, thanks!

--
Thanks,
Sasha

\
 
 \ /
  Last update: 2021-03-04 23:25    [W:0.231 / U:1.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site