Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1189616rdb; Fri, 19 Jan 2024 10:49:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGG/JidKAmB5rMfU9ns1wLlmnsOvvo7bCv+2b3OgQKjmQciqfu1YyRZtl5r6DLfhNhNj5sF X-Received: by 2002:a0c:e0d4:0:b0:682:bfd0:d79e with SMTP id x20-20020a0ce0d4000000b00682bfd0d79emr383306qvk.27.1705690177218; Fri, 19 Jan 2024 10:49:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705690177; cv=pass; d=google.com; s=arc-20160816; b=zuJqS4DpaMoRt9RIk3itrnqfT3HM4wNYUqZ7WP27JH9jaD6pr2alXYjEf90+PXqQ22 qTpT/GUSZHqQtVCD37Aei9nsYsoVJai406UEKknz2L1t/n3KLPGNn8C7VLB1fnrlMc13 m42+wkbxYeqat3dflelureYEzxVunzfbiGQTzd58IXgLZHBCNn3NMu36xaA7cByK8OwC W8qMA6QO8G+Jy4qI8Gxz1a8VV2tIj+ZLICh06WjzafLWAvkkbUkX9mdeGkCjt8NBVqX3 7yeLNgb67NHzQMPbjtQItGYQawxrfS1UNKCbpZCmpmbmLcQtxagNRVVSfsf2a9uGbQwS pTrA== 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:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=krPNAWpEhdO9kMaWrWqIUhp9mxXxNNl19QSIc2wCsrs=; fh=TR5Gg30v3tsunp9zlnj9BCAk32Yv/gHGLFfg9mPqX30=; b=QmsBu+P8L77uxl7uSF7jd2UBaOJye/Mzraly0Yjqo9nJcktpTdjnuPJVSMU93m7cVb CAHUjcf1xqRuGo2i+SaPaFZfJr41VBa8HrLpg9A0zACi4yk63nrl73soqL66VxWZzyEI G3NK3FDCuwlksgkB4W4sQ/uHZK2A9F+XwGEQv0Hp617I1Tk6g1SjVslz4acsWazduuxd x8LhhoxaJr6A8RvqVMYTJeYUY3zVPO3fWVVzqBj+54w7oe40EfzR2LULRC4GDOmeZ0fH KXGrL5l2PsSXSZwhVJoUDaR5GC+k6t2iuJyLFLmRaortPUbtcKyxYnrlIq5C8i3QEQnH YGIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tE9psFBD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tE9psFBD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-ext4+bounces-862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 t18-20020a0cde12000000b00683b4080978si1616728qvk.509.2024.01.19.10.49.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 10:49:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-862-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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tE9psFBD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=tE9psFBD; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-ext4+bounces-862-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 E704E1C24D64 for ; Fri, 19 Jan 2024 18:49:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A73165730E; Fri, 19 Jan 2024 18:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tE9psFBD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="5RSmKEq6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tE9psFBD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="5RSmKEq6" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 C87B75674C; Fri, 19 Jan 2024 18:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705690132; cv=none; b=FmWIGbYmhyPqteV/BxJ57dLaa3WBW0FQl2BTUOEK6CGgrzjpNL0rGMo5Kc1Q44H2ww2EU9t1JBj4Zkf7du0wZObUOce6bkWoPLEprZIuP1qgOuu1i42/+4bJSQj2orIaJZ/XFdRZW+pJeTy/gWR+pPgr5027v1+jH4TF1onw1hY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705690132; c=relaxed/simple; bh=Kj5D36lqEJ+u6O/TSFro1d3U+G77/yBKoYveG/26XpU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nBvXF33mC+U0ULDpT7fXo7P1kFBJbvAhHA/TmU9rBD3HkcvK6BHmLWqbbTadJ5gc0YIuKCuxgvpStCWjr1ktsay0tnZXgGNVNGV3b+fxUMHFxz83SerBjtCEXyatjzB0y+OfucXQy6V1Ywv/Kkv9eq5m6sGKfTVYkOlbXNRdxrM= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tE9psFBD; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=5RSmKEq6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tE9psFBD; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=5RSmKEq6; arc=none smtp.client-ip=195.135.223.131 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 [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 2389D1FD1A; Fri, 19 Jan 2024 18:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705690129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=krPNAWpEhdO9kMaWrWqIUhp9mxXxNNl19QSIc2wCsrs=; b=tE9psFBDtpm9LAE8wt8mo6BXItPt2sDmagaIsQEAQLakn3yqE57HcRt2jRVbPYJRRMVPf8 3/TbDvEoP6IdVudPVQ3BHEy4YUU5FZymJvpi81VcIlDFIfhKd2n7+h3ZKIahGrcxNligRY Mc9c9NBeuxNxws6k42/mZltArIVQB04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705690129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=krPNAWpEhdO9kMaWrWqIUhp9mxXxNNl19QSIc2wCsrs=; b=5RSmKEq6JqBqmAsHWoX3BJyhmY0FpZ6zphEu9XoVLdyBO538r7P42ebgDi/oBOZtcPePv2 Mg0KCniogrvCL2BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705690129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=krPNAWpEhdO9kMaWrWqIUhp9mxXxNNl19QSIc2wCsrs=; b=tE9psFBDtpm9LAE8wt8mo6BXItPt2sDmagaIsQEAQLakn3yqE57HcRt2jRVbPYJRRMVPf8 3/TbDvEoP6IdVudPVQ3BHEy4YUU5FZymJvpi81VcIlDFIfhKd2n7+h3ZKIahGrcxNligRY Mc9c9NBeuxNxws6k42/mZltArIVQB04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705690129; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=krPNAWpEhdO9kMaWrWqIUhp9mxXxNNl19QSIc2wCsrs=; b=5RSmKEq6JqBqmAsHWoX3BJyhmY0FpZ6zphEu9XoVLdyBO538r7P42ebgDi/oBOZtcPePv2 Mg0KCniogrvCL2BA== 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 7128C136F5; Fri, 19 Jan 2024 18:48:48 +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 bOvFChDEqmV5DAAAD6G6ig (envelope-from ); Fri, 19 Jan 2024 18:48:48 +0000 From: Gabriel Krisman Bertazi To: viro@zeniv.linux.org.uk, ebiggers@kernel.org, jaegeuk@kernel.org, tytso@mit.edu Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, amir73il@gmail.com, Gabriel Krisman Bertazi Subject: [PATCH v3 10/10] libfs: Drop generic_set_encrypted_ci_d_ops Date: Fri, 19 Jan 2024 15:47:42 -0300 Message-ID: <20240119184742.31088-11-krisman@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119184742.31088-1-krisman@suse.de> References: <20240119184742.31088-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 Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; R_RATELIMIT(0.00)[to_ip_from(RLzk7q5dcbbphp39zi8hi5jhbt)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.sourceforge.net,gmail.com,suse.de]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: 0.90 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 9cd4df6969d2..c5c92ac76ba7 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