Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3372805rdh; Thu, 28 Sep 2023 09:42:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE68JvzjdiQQnU+tBVsqWYvlTGOkapZDJa6p9u86EgvhPNmNVda3k50PQR/UDrzHa0vIgEF X-Received: by 2002:a17:902:7596:b0:1c7:25fd:661f with SMTP id j22-20020a170902759600b001c725fd661fmr1670496pll.42.1695919331935; Thu, 28 Sep 2023 09:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695919331; cv=none; d=google.com; s=arc-20160816; b=au0OnrhCSeSEKERJ/+Kz/KU8wpiKEFF97fRU7/lEv+q7N2uWyw9W/w8fu/tjAoU/IA EFlpQSdhIKGqsbvdTvFmJ1Dsqom3twRtyVHbmoa3Jts+AoNsygIskvhGqaja2hOaU1sV pDdsv+uySIXXxFTVLVM7M48CgpQMVKAAqa5ZcFzHWltxPNnA12Ly9XFgUdJNgbgwr3X8 RZILO/lHR9PDu/JSMIxx+bgy4EBE4wveZAGwjEAJa5aJFJYaIdiJUx4A+TWo3HhuoJtZ 7/ve3JdCZ3jf+2TMsEMA4XXmvCN4VeIOB1gctiAYYLW0wcQh5D4I2g8AkzdW6qYA7jY6 mS4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KxOdXifr737zF3CeEWOKJyKIYSbCOgkB5LkxYWLpL/k=; fh=ozfauyGmbBvp0wVp7AQpiLBDXsNcx2OZzRavWY6eumo=; b=0ef0UImDZFAnlU/lMZncnQAu1ZO4rBdMywjQzv/YYI7YLS4jeJhzKGRJ6avK83HG60 YY8tYMqt31GDakg73CCL7So+94ee/rjUv+tEDjJNndfHSPB9QSyLocegVYzdq4Fj428Y +ytb0oIhdN0tO6wHBElZyn1MJqcO4FQYUcPgD+JMk7N7hNmqevprmKBEc6g9/C2gWwZj FJdP82Sexwc7Hf6nKKUvaLfNsjoRBf2S7yr0p4Y8M7UhG5yZO1JzW9EEwH/m8+VEhqCy tWGnsZbz/OGm8zddT71sxQHr+GziVTbrwlsuz0c0+HlOLdI7S45dnTSnmMeKrSP0a+7I HNbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b4qb0Nxy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a5-20020a170902710500b001c4514c872fsi17473756pll.485.2023.09.28.09.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b4qb0Nxy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CB9D78040C59; Thu, 28 Sep 2023 09:22:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231158AbjI1QWI (ORCPT + 99 others); Thu, 28 Sep 2023 12:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjI1QWG (ORCPT ); Thu, 28 Sep 2023 12:22:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D31DB7; Thu, 28 Sep 2023 09:22:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E1E0C433C7; Thu, 28 Sep 2023 16:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695918124; bh=0MlJccgS93tYhYBmiMCadXQzGmVcPB51jzpzwfRNecY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b4qb0NxyQjwWq/Zfx4eRW2G+km70dYY4EiUPdBvHHIRyw1G4C8gJ5Mtr6qfF5hj9I oYHC3luT7EBfvKJm71UJcB0E/RpjpVYR2qzuYxa2IH5eCstWdU30hh5+ERicQ21/sH LaNcPjIEunprotj8FpYdXoS1EVdsU45LR+nm1B0Y15pA10nCexGyeXCpS6mvXm7/Ew +MS34iuIeWITEhMBwWkAUGDEJ2ss3RQYeBSutgHjCModZ+5EN1Ke2uKRfxBExTOSYy pDNi1Z6cLp9NCNPlpRF4buIBRdvv9GH7IFHsz8LksZyaNoO5toPNKHPhdRx/q7todN Bfqf6lMPkvR8Q== From: Christian Brauner To: Luis Henriques Cc: Christian Brauner , Mateusz Guzik , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , David Howells Subject: Re: [PATCH v2] fs: simplify misleading code to remove ambiguity regarding ihold()/iput() Date: Thu, 28 Sep 2023 18:21:58 +0200 Message-Id: <20230928-zecken-werkvertrag-59ae5e5044de@brauner> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230928152341.303-1-lhenriques@suse.de> References: <20230928152341.303-1-lhenriques@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1250; i=brauner@kernel.org; h=from:subject:message-id; bh=0MlJccgS93tYhYBmiMCadXQzGmVcPB51jzpzwfRNecY=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaSKrlAsqy0/WLrX+1usVIPYk2fn775wNNT+9u9rpEpB7nbV ++v/d5SyMIhxMciKKbI4tJuEyy3nqdhslKkBM4eVCWQIAxenAEzkwXZGhsZN+Xt4Mu1TI+y4pV+69f zJnN79OTWq/YnMT4myT8enGzP8z15m+HPSkdaFAfxXtqj4zeRfcu6qyM0/BdG2ypMKkv8e5wYA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 09:22:16 -0700 (PDT) On Thu, 28 Sep 2023 16:23:41 +0100, Luís Henriques wrote: > Because 'inode' is being initialised before checking if 'dentry' is negative > it looks like an extra iput() on 'inode' may happen since the ihold() is > done only if the dentry is *not* negative. In reality this doesn't happen > because d_is_negative() is never true if ->d_inode is NULL. This patch only > makes the code easier to understand, as I was initially mislead by it. > > > [...] Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/1] fs: simplify misleading code to remove ambiguity regarding ihold()/iput() https://git.kernel.org/vfs/vfs/c/5c29bcfaa4cf