Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2468855lqz; Tue, 2 Apr 2024 20:43:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVT2eaPo3I70W6sJGVG7WX7x3+5ykCp397aAX6UwbOC/8DUPV0sXuqHjz3J9Ha6ptPTc/K00hCxj+4vITpF2gZzkEwNQ4uUiS69MrM+6A== X-Google-Smtp-Source: AGHT+IGakO4u8a36S79npIO96PqnFtlgnsXOr7+NvVW1wTM+CZmWwMHEEbOa5uERAe3gHs9pJaqH X-Received: by 2002:a17:90a:b884:b0:29b:c31:1fe1 with SMTP id o4-20020a17090ab88400b0029b0c311fe1mr1916945pjr.10.1712115819621; Tue, 02 Apr 2024 20:43:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712115819; cv=pass; d=google.com; s=arc-20160816; b=RNsn/uO9E+q275npTAh6OlQbKLHxmgC8joFHju0S+w2j6IXsRjolKwGpBNxeBdyW24 Txrmo735b9DmYNsrnK7Kaw69HIBxlGd0vunBZ7/ow6XluI/XITH/mT3gulcMVh7Sdi0e lOevbWvsI/hfYyocozyJ4lgs5FGlgFldGVQVc7jCq35+Y2R/8bXTIJhr79Z15FtzyjO2 AgLdxt6vL4MKk2kWCZ1cK85bmLn4oq3YYNUar2Bauo06PYP74hiLmyGrismn3k2sYggl syLutBH9VYcS8BKA/B4P5JjcUnK6flK/xAOfAB7du0l3EAKji656go2ZrlURD8o0oAyI Gz2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vOUsZsN2iNQo+K5f8b8RDtEE7SaVy2QQaMGKZQqum3k=; fh=ox++7A8yAJwV7L7WW9rN9jXxvkgDSL3rCldPnpw2nqQ=; b=SPthKNSwxkimSmIwLo7EIZWC8Eg08rNFeyU6YrKfTfneOQ0lO6ij5LcpD2FwI/rySh CuR0dHQHddhESHo0ptRnCe4PXJdBNXwM3BfWh6BbhV4CkT5FOgRkvmNQkE9aZ7+B34nE VZWH+UULJs4JdjMHPBbQBcolPxBcaWARPZRNIHpvPlI3FMAdsUUKKHjY5J8GuNhaXM0+ DskxYk0ksN/0lhFh5MLlETbACOQzQPUYzkSOwu2H+UeLpYxIa7ub4JF5BgmHL9UnmD8z G0MfnabJIx55nHEgLvQnG5tJuwvxUzrvg4s8WsEFCRR2iHVj5xMMWkQxaL6cGW7G4sqC mVTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jD8RoC2u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-1838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x9-20020a17090aca0900b0029c614c3f5fsi12207640pjt.149.2024.04.02.20.43.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 20:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jD8RoC2u; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-1838-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1838-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 446672816DE for ; Wed, 3 Apr 2024 03:43:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3769A3FB09; Wed, 3 Apr 2024 03:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jD8RoC2u" X-Original-To: linux-ext4@vger.kernel.org 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 A811E3D76; Wed, 3 Apr 2024 03:43:30 +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=1712115811; cv=none; b=XsQNAfHeCInc/u3BIb13vFz2Nt85AUpqPHNdD+Uh8kWNHgHtFbEKtxdYSTGzaEYOETU9eEXLrYFhrJrBahEe637nLQlLOop8St9efyivQtoIhWxannpK+becknDEpWDph76Ssy7e28uFh6BVm791yHxvRkm50o0mOAJiuS8spto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712115811; c=relaxed/simple; bh=s7/TSFoZCTujo5clr5oMUi2k1rXwU6wxmLVEFWWgRkU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EC0h8Pks3C9v0ESh/DebaedOJVTLYf90CsMQsAm5tHnV0+n2DJwXuesY6riFS0x7K7+KM70r6ZghxHfmtUl/5Ycx0kKHwvCriiAzdgnG4DyEKfrEe25pSpGOMcG8NxZsUhCfDg2QRSoZc5V+qqY0c738pBUtkX2KE/HV+4hjTHU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jD8RoC2u; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18160C433C7; Wed, 3 Apr 2024 03:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712115810; bh=s7/TSFoZCTujo5clr5oMUi2k1rXwU6wxmLVEFWWgRkU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jD8RoC2uZ8BxQS36zgcM+wnGfDSCz+IKoBlYePPxOpmJryZaes5zDeCrR8XuwJo/B 25sX34qXV3vezh48cN8ekUsylZNy64OPcySwmhAkpgHO5UKfBygdNACIisiWY1OS5+ +9Bx/+pbzINpirerZ0r+gT9v43p1QKpvyTNuvZb1dV5xS0ycAGbqhjSZ01XsvmuUuN WvmDmekhQwtePz21O+1I6WGLUAJM55WxvdNOFjAXDf9hSNnmUpt0ZiZlqxFE0XFtcZ Y8UH1+q2ZHxaSXArEUOPgZF16XUqJc/PQnH50BcDWcj7v8DxQl9JvWAz58mrIACq1j tXJ9UEz9f+VaA== Date: Tue, 2 Apr 2024 20:43:28 -0700 From: Eric Biggers To: Eugen Hristev Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, krisman@suse.de, Gabriel Krisman Bertazi Subject: Re: [PATCH v15 4/9] ext4: Reuse generic_ci_match for ci comparisons Message-ID: <20240403034328.GF2576@sol.localdomain> References: <20240402154842.508032-1-eugen.hristev@collabora.com> <20240402154842.508032-5-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240402154842.508032-5-eugen.hristev@collabora.com> On Tue, Apr 02, 2024 at 06:48:37PM +0300, Eugen Hristev wrote: > + ret = generic_ci_match(parent, fname->usr_fname, > + &fname->cf_name, de->name, > + de->name_len); > + if (ret < 0) { > + /* > + * Treat comparison errors as not a match. The > + * only case where it happens is on a disk > + * corruption or ENOMEM. > + */ > + return false; > } > - return !ext4_ci_compare(parent, fname->usr_fname, de->name, > - de->name_len, false); > + return ret; Maybe write this as simply 'return ret > 0;'? - Eric