Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp616682pxb; Wed, 24 Feb 2021 10:16:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFGP4nS2vFkG8f3WF789Ui5/lDotbN8MPggq95e//zgUbR4NgMr2fiI13NMTU++MfTmMXI X-Received: by 2002:a17:906:2652:: with SMTP id i18mr32119589ejc.213.1614190607731; Wed, 24 Feb 2021 10:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614190607; cv=none; d=google.com; s=arc-20160816; b=vPTJWr5lqR1Tym5o216jy7tqcLIs+vM1MZw1wsE2je3HHd7isvrhs9B5pzJqGEy71I Na0HXV8Lt6fUWsWukAQF+ao+1zYgv/P+2jrmjYe905KZ7c3AY6sd86YKalB1JkzRr1LB bhw51SH2OWuefJ4664+ni8gs7KIj7QSEWtPtFd3yoUzLbxtywUZRplPnvGBgofTZ32E/ okYwpqBH/V61TPvVeidZqRXpxwz7U+D2MJWlEhvd/nKfOS4/Rw30YoH+cBjHb0e0Z1nM czdvyC4l1HUuqskYfGeKR3YU56cIFN856H58/izoakaaMcLiV7vyT7As/oHHspIhTipw HD/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date; bh=seKxIc5OidVIxg4fNpOShqAqTJrjVJLRdWxA5L4oXRI=; b=HlMRGfvrU7GUfVxM9zcM8CqZTj5FxF9ggM/SqE/bgt+guPOwc8Pfur65/qTQhbFjxd 9OLRcqN5nuVmACSMc9d2+SJZj3jOx+lHJpijCwnZeJkxRJxfAr3xJp28NICHO9OHyhMQ mOqIgmNwEUU8lJjdrMypXNMlCQwPxZYz2SEUlW3fiqmPDjTyRYr6PigpvfCqgmOcTnsv xdcGPMicghU4xmDhW99wnEr9Z2PjoGS0qEzFPo1v3JajkJPIE8TifU7MAbdEBNh/I781 hk+C4ZPYewKjts6LimuBZdLrANSQnwN2FQoKuHYyATr5bynI4U6Z+2vszoN+nUwJh3Wg GgAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si1624033edr.539.2021.02.24.10.16.23; Wed, 24 Feb 2021 10:16:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233204AbhBXSMi (ORCPT + 99 others); Wed, 24 Feb 2021 13:12:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:41174 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233732AbhBXSM0 (ORCPT ); Wed, 24 Feb 2021 13:12:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1FFF7AAAE; Wed, 24 Feb 2021 18:11:42 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 50A29DA7B0; Wed, 24 Feb 2021 19:09:42 +0100 (CET) Date: Wed, 24 Feb 2021 19:09:42 +0100 From: David Sterba To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nikolay Borisov , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.11 54/67] btrfs: make btrfs_start_delalloc_root's nr argument a long Message-ID: <20210224180942.GZ1993@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nikolay Borisov , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org References: <20210224125026.481804-1-sashal@kernel.org> <20210224125026.481804-54-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224125026.481804-54-sashal@kernel.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2021 at 07:50:12AM -0500, Sasha Levin wrote: > From: Nikolay Borisov > > [ 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.