From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76AF51CB33A; Wed, 7 Aug 2024 10:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723025429; cv=none; b=UbfoOs0xV3xFx7aIspQtyhJ3ObqgdyKkBN5n7z19z8IW5cNzwxP9MbUll4LG8576kRtCVravffUc6icDFN+iLrjY5QXHZo41TvF5roJvyRwpxpycB+mxIOVkpJ6GgBTnqgbIZWritXMCBXMcLLZ//UqfeYgbEegLE8828Z4t42M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723025429; c=relaxed/simple; bh=eBc8BK6TF2PeBiD3vbcn930TmC98UXZiLj/lgQVZk8c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VAHGfPf1l6xFacnGACxw/e72FoYisDGXzg3BKgrhRAzHr7TVQt7y/eTu3n4rSJpd3c4NIgWiT6woyQnHT93EN7zF2HoFzTdMc53MiYHSWkNeIUDBniJF8F8+GbsSXjs5VMPgPUx1a9VJVO2xsqhb94AOIY3tiYTT7ZfYKB5UFGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o3NI6b4T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o3NI6b4T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C26E1C32782; Wed, 7 Aug 2024 10:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723025429; bh=eBc8BK6TF2PeBiD3vbcn930TmC98UXZiLj/lgQVZk8c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o3NI6b4TjqIS2p/fGCEiCrezINlzvUX+cJko6yRAjJRWijiDoHvZ8wipJHJj5gLh/ 5/zZKJWgA5QK0GW1uOrCa0tTiP3g3H4brdbuz7eydtvQwXpFoDzfUfKVXoTWslazjR 1PkKF+Gk7ku1BJ05SmuKBJU70tMdW3xbCGHgpFjfNMVKu++/5gFIwUfx2t/usYYYsc pjSwDlS5NSEoupr0oIlJEzGRsVMlxWo/zK7DUy5OYDGyOdyjtLqYVpGTVnhvfjAzlg ygDLpJ2TbzGKDAiu2Hp0xU96wgb4mHEojsJOg8YGVlIDFJLhlqqwDW9mrj4W2QRErg YQSbHOCVmCSgw== Date: Wed, 7 Aug 2024 12:10:23 +0200 From: Christian Brauner To: viro@kernel.org Cc: linux-fsdevel@vger.kernel.org, amir73il@gmail.com, bpf@vger.kernel.org, cgroups@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, torvalds@linux-foundation.org Subject: Re: [PATCH 05/39] regularize emptiness checks in fini_module(2) and vfs_dedupe_file_range() Message-ID: <20240807-referat-klischee-162c96b05177@brauner> References: <20240730050927.GC5334@ZenIV> <20240730051625.14349-1-viro@kernel.org> <20240730051625.14349-5-viro@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240730051625.14349-5-viro@kernel.org> On Tue, Jul 30, 2024 at 01:15:51AM GMT, viro@kernel.org wrote: > From: Al Viro > > Currently all emptiness checks are done as fd_file(...) in boolean > context (usually something like if (!fd_file(f))...); those will be > taken care of later. > > However, there's a couple of places where we do those checks as > 'store fd_file(...) into a variable, then check if this variable is > NULL' and those are harder to spot. > > Get rid of those now. > > use fd_empty() instead of extracting file and then checking it for NULL. > > Signed-off-by: Al Viro > --- Reviewed-by: Christian Brauner