From patchwork Wed Dec 13 23:40:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 13492141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05B70C4167B for ; Thu, 14 Dec 2023 00:06:01 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rDZEm-0005KU-1b; Thu, 14 Dec 2023 00:06:00 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rDZEl-0005KO-40 for linux-f2fs-devel@lists.sourceforge.net; Thu, 14 Dec 2023 00:05:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5Nii7VhaRES/V/l6FUEUsiUl+Zlzav4SYIkwy9riFEY=; b=XiYmXz57TGH0MuowQKAG35K3Re Yzd/u4os12RpvlxHYp+Q1CxTWto2qaALqtGr1+hcP7EDvQXRhGmVBNCQunZEvEwLFe9YmL4hdL7/J LcJrl4T0T/N9GVi6UUvq4dixQSrbmXwoKtce/uIneGuRSwW7j8DLuHeCpjh17ekgDir0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5Nii7VhaRES/V/l6FUEUsiUl+Zlzav4SYIkwy9riFEY=; b=L4UgxPLAlfHG6wIX0xblP6i6fC t4W0V2DCItrPHuTT4pswLiENmdEC/WlTewfuyhcW9WZG2LE1qdjvwR1hZnvB9lX4nNdywhZ9f5mnb ECWrgmtPQsXiF60zrVWuC90A66smoTQXJmvygZc+Mjo/BisM8UJF29M/IREXYFQ8YJtM=; Received: from smtp-out2.suse.de ([195.135.223.131]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1rDZEk-00084y-F3 for linux-f2fs-devel@lists.sourceforge.net; Thu, 14 Dec 2023 00:05:59 +0000 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 115201F792; Wed, 13 Dec 2023 23:40:55 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CC26A1377F; Wed, 13 Dec 2023 23:40:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id g8DAKwZBemV6PgAAD6G6ig (envelope-from ); Wed, 13 Dec 2023 23:40:54 +0000 From: Gabriel Krisman Bertazi To: viro@zeniv.linux.org.uk, ebiggers@kernel.org, jaegeuk@kernel.org, tytso@mit.edu Date: Wed, 13 Dec 2023 18:40:30 -0500 Message-ID: <20231213234031.1081-8-krisman@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213234031.1081-1-krisman@suse.de> References: <20231213234031.1081-1-krisman@suse.de> MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 115201F792 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Headers-End: 1rDZEk-00084y-F3 Subject: [f2fs-dev] [PATCH 7/8] libfs: Don't support setting casefold operations during lookup X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, Gabriel Krisman Bertazi , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net No filesystems depend on it anymore, and it is generally a bad idea. Since all dentries should have the same set of dentry operations in case-insensitive filesystems, it should be configured through ->s_d_op. Signed-off-by: Gabriel Krisman Bertazi --- fs/libfs.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index b8ecada3a5b2..41c02c003265 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -1784,27 +1784,12 @@ static const struct dentry_operations generic_encrypted_dentry_ops = { * generic_set_encrypted_ci_d_ops - helper for setting d_ops for given dentry * @dentry: dentry to set ops on * - * Casefolded directories need d_hash and d_compare set, so that the dentries - * contained in them are handled case-insensitively. Note that these operations - * are needed on the parent directory rather than on the dentries in it, and - * while the casefolding flag can be toggled on and off on an empty directory, - * dentry_operations can't be changed later. As a result, if the filesystem has - * casefolding support enabled at all, we have to give all dentries the - * casefolding operations even if their inode doesn't have the casefolding flag - * currently (and thus the casefolding ops would be no-ops for now). - * * Encryption works differently in that the only dentry operation it needs is * d_revalidate, which it only needs on dentries that have the no-key name flag. * The no-key flag can't be set "later", so we don't have to worry about that. */ void generic_set_encrypted_ci_d_ops(struct dentry *dentry) { -#if IS_ENABLED(CONFIG_UNICODE) - if (dentry->d_sb->s_encoding) { - d_set_d_op(dentry, &generic_ci_dentry_ops); - return; - } -#endif #ifdef CONFIG_FS_ENCRYPTION if (dentry->d_flags & DCACHE_NOKEY_NAME) { d_set_d_op(dentry, &generic_encrypted_dentry_ops);