From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65AF9C5519F for ; Wed, 18 Nov 2020 18:32:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAAAC2168B for ; Wed, 18 Nov 2020 18:32:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="lMbgFoel" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgKRScF (ORCPT ); Wed, 18 Nov 2020 13:32:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:49038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbgKRScF (ORCPT ); Wed, 18 Nov 2020 13:32:05 -0500 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C14482076E; Wed, 18 Nov 2020 18:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605724324; bh=SF6czFyUVoCSbzDlPAUCgmPSS0JKy3lsEIQaFy7Bvvo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lMbgFoelI/TNirFp3bkkrWuOteC8rAKh1UcHpWZpjLMHq1i5ckHRjkE+oZlAjYvGC T/CRAZSXjsOjXTXPvrGWFb+PrT8dGRlcIirZsaZf55RaV+bviSwA0v7iYfL7x9tdfR tjIJPtI19BkRgjL0oDtuukfMOhO/99K8DTIP3qv8= Date: Wed, 18 Nov 2020 10:32:02 -0800 From: Eric Biggers To: Daniel Rosenberg Cc: "Theodore Y . Ts'o" , Jaegeuk Kim , Andreas Dilger , Chao Yu , Alexander Viro , Richard Weinberger , linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Gabriel Krisman Bertazi , kernel-team@android.com Subject: Re: [PATCH v3 1/3] libfs: Add generic function for setting dentry_ops Message-ID: References: <20201118064245.265117-1-drosen@google.com> <20201118064245.265117-2-drosen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118064245.265117-2-drosen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 06:42:43AM +0000, Daniel Rosenberg wrote: > +#if IS_ENABLED(CONFIG_UNICODE) && IS_ENABLED(CONFIG_FS_ENCRYPTION) > +static const struct dentry_operations generic_encrypted_ci_dentry_ops = { > + .d_hash = generic_ci_d_hash, > + .d_compare = generic_ci_d_compare, > + .d_revalidate = fscrypt_d_revalidate, > +}; > +#endif One nit: it would be good to change the #if condition above to: #if defined(CONFIG_FS_ENCRYPTION) && defined(CONFIG_UNICODE) ... to make it identical to the #if condition later on: > +#if defined(CONFIG_FS_ENCRYPTION) && defined(CONFIG_UNICODE) > + if (needs_encrypt_ops && needs_ci_ops) { > + d_set_d_op(dentry, &generic_encrypted_ci_dentry_ops); > + return; > + } > #endif It doesn't actually matter, but it's nice to keep things consistent. Otherwise, please feel free to add: Reviewed-by: Eric Biggers - Eric