Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp625439rdb; Mon, 29 Jan 2024 12:46:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IExkAk7xj1PTove907akbeMft267HwqNEbNH72GUwwrW4fd5aE95S4dvf4oKTMGbhu46vgn X-Received: by 2002:a05:622a:48f:b0:42a:6e1b:a2b6 with SMTP id p15-20020a05622a048f00b0042a6e1ba2b6mr8869354qtx.12.1706561164514; Mon, 29 Jan 2024 12:46:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706561164; cv=pass; d=google.com; s=arc-20160816; b=XyskUQhV3DyCFf6C0ZXfda7GLLGMctHk/oysVX0KNlFvXMHhMvOzwQZ1mQzkp7VILt yOTskShvYiM2LJAKK9bIDtmE2A8tAqqnYTE7kIWdDnErUjcDH1SzR2HBwEsFrggkEUS0 dM38RNXPqZ1kvdYxaNJxN5tlLR7Nki2oUqgPC2kCf4Ik1KIyRyUArAev+yDlECo2jtxj tPk+0/NuEnstVch8DpDyCRBLuF416DncegqxxrieNq3vspFfbJXETuvXIcu29B/pRu8a 3VG+a07JCQi4urgr6PmLQ5HuRW8zpgjvz75H/hV3E+8sNbX4+ZS0BL3XMAg90Fz4jnV3 rxCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=xqFo+NbC+4N+nbk/+SEqgEGx6mP0Hq6kIaXRoErZ8as=; fh=M648oune0DwZmCHpgeKmdqyNG9Pnhrh1APj5VeeCjyQ=; b=aToN8KdJUJKCylmas9vzOOfdjpF2iAsdaD8DMhxlTG/7XvUQFFshFLjvpbvuhk7HaC 1ZTyZXA1uki/a8U+FF6gZLRlbr6n2uCFyQf4ionRKH6zuz0rBXCk6n3lRFl/7GMLnSjS czCuBBoJyQ8f7fhSHGGx3DQ92IEb3RWPQfI1B6LvyPYwW4DbKBgHkpNGwBgrMrQ6FbyL Lk+TlhlKyx447F3G6++w9tgJKadfN7Dzd9/pxrYnBtV/pJo7jGblKaabLF3DZQxxXeIh eSEIQq1pLbqaNsCpG9rWCp92ylFI6IgUr0XcUIs54iPlJ8zIDk77qGEUjXdXrk14Dboc wXeA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-ext4+bounces-1011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp14-20020a05622a1b8e00b0042a2ec10692si8326063qtb.244.2024.01.29.12.46.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 12:46:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-ext4+bounces-1011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F35501C249E1 for ; Mon, 29 Jan 2024 20:45:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08E3615A486; Mon, 29 Jan 2024 20:44:25 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30B5F15698F; Mon, 29 Jan 2024 20:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706561064; cv=none; b=mB0D5ErWv7hCzsWIQ2xIB2JwkC5492XoGf+rI+A9Zj2goYjKqR9mMRvOa21861ZN367Tacua5th8JcfvTgNoHdbdfiogOHojxmD7Qy4cat+RnELHxpxidmzu20AvrU8wGuxJBloPt3UR42tfObOkynsl1mRbAf6ISfPhxjH48v0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706561064; c=relaxed/simple; bh=S9Le+RDOZE+/jyLKuh6bypOJf7kdPy6re1UaYeEIlBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ew6tIDYMTaZvNqlCqgKDEtsa3lvZYFCJdeKijNlegIHCJDtpl0Qzlk8P5St644RjropghmobDXjjYqHXq6Qv7frUHAFYepJHEVuVy8yNmMQZhTdj0e4yqidjc7LtYV9Ip+OiEgPYLZi/AneNHN2/hi1MUCDr5ja17GIaj9cRh0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de 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-out1.suse.de (Postfix) with ESMTPS id AD35221E90; Mon, 29 Jan 2024 20:44:21 +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 10E8012FF7; Mon, 29 Jan 2024 20:44:20 +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 GGCcLSQOuGX/DAAAD6G6ig (envelope-from ); Mon, 29 Jan 2024 20:44:20 +0000 From: Gabriel Krisman Bertazi To: ebiggers@kernel.org, viro@zeniv.linux.org.uk, jaegeuk@kernel.org, tytso@mit.edu Cc: amir73il@gmail.com, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Gabriel Krisman Bertazi Subject: [PATCH v5 12/12] libfs: Drop generic_set_encrypted_ci_d_ops Date: Mon, 29 Jan 2024 17:43:30 -0300 Message-ID: <20240129204330.32346-13-krisman@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129204330.32346-1-krisman@suse.de> References: <20240129204330.32346-1-krisman@suse.de> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: AD35221E90 X-Spam-Flag: NO 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 propagated through ->s_d_op. Signed-off-by: Gabriel Krisman Bertazi --- fs/libfs.c | 34 ---------------------------------- include/linux/fs.h | 1 - 2 files changed, 35 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index 0aa388ee82ff..35124987f162 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -1788,40 +1788,6 @@ static const struct dentry_operations generic_encrypted_dentry_ops = { }; #endif -/** - * 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); - return; - } -#endif -} -EXPORT_SYMBOL(generic_set_encrypted_ci_d_ops); - /** * generic_set_sb_d_ops - helper for choosing the set of * filesystem-wide dentry operations for the enabled features diff --git a/include/linux/fs.h b/include/linux/fs.h index c985d9392b61..c0cfc53f95bb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3201,7 +3201,6 @@ extern int generic_file_fsync(struct file *, loff_t, loff_t, int); extern int generic_check_addressable(unsigned, u64); -extern void generic_set_encrypted_ci_d_ops(struct dentry *dentry); extern void generic_set_sb_d_ops(struct super_block *sb); static inline bool sb_has_encoding(const struct super_block *sb) -- 2.43.0