Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2805865rdb; Mon, 12 Feb 2024 18:30:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUGvJv8k7XhOh608+4QHnez8x6gKnlKxVu7Z/E/jtXmQCkJuUSGezGvLI7w+rppSeW46wo7QSSGRDz1QZ+TG3NaEQJs1QOs9nS2n0jLQw== X-Google-Smtp-Source: AGHT+IF4YQIgOnYoy72yIFndluVD1YtQb8AMHtZilHVg346FwydPF91KI7q5mGElWY1e6NYECrWG X-Received: by 2002:a17:902:db11:b0:1d9:a825:19cf with SMTP id m17-20020a170902db1100b001d9a82519cfmr7973528plx.32.1707791410538; Mon, 12 Feb 2024 18:30:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707791410; cv=pass; d=google.com; s=arc-20160816; b=XQVZEP0v3kCTOeSmO9b+M0jY9AekMgEt4n2cITDVyLuXcCMvH3PHMFwlHaL4wW5L1l jIFNbsyTawrdbgPeoY6J3jlQmW8xeS87jFjRglC0IJy9A7EZuFu8aI8Uoov23qnxMq4I tcRbYQ8GvWZpO6aASob2JMwf0ZStFvMK722elX9JiXD++lQvirtpuGghPrWdEkA5GVUM f3fXLIFxxs/cJUq2XCiXsKnW0JPjisWUS+/2QkEsV/u91KUW7xahnmKTTlUprv7zUWvD I2ggR+P+BXnQg9d2IVITKoqnhHIp1PV1PCpi0QWk2QpUaE0XjPrcaZfUNTv6Nufhbt/P nRfQ== 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=fmdpLcH0KspyYreOUudTmM94kWGbFgdXTKIvo+uwB7A=; fh=e5ab/KOLDJX9a/AhEGiYnaoI58Yvn+uzLVneB5q3gqs=; b=DNbIeD5D0oog5g4yJMhc2yKvGfAltoscj15diAbc6byYcUReXWB9RBhhP0GvmxaRpe Ma9f0vWonf4cF7BdOCsNwFOqocmNnIN0k7e2pRG9uLhl4SU+j7lvNQV9Tv2ZYe5hpdlF ElQmbO6KmwXAgWVo+ckGjvDWsHN3IHoofIcGgg+qzOLwhbUl2E4iIJI26YHQ2bbxv5R9 ZizQ3Sp6qd5zqkkUgVqwcspGqPmteLISt1FqBGsv1PMmWyFvt66zdf/T6fG4A3YHzSgi tsaxI1ZnoGRP+/rGCLFt02q09fimIXb6RThTW2g9b59HcRcJ08gXCKmbZzs88ndLFIYA DUyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q5qpj6UY; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q5qpj6UY; 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-1214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1214-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de X-Forwarded-Encrypted: i=2; AJvYcCVsxxJKBfMd5Jbept0j8wWMRWb/f/LpqgAgfUTkIGUW1xlwGhpCABakE++Bd+sEgKaj1UHkcdKnYYF/DNXtcQ6E4+KF48quzV1dYU0kKQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s3-20020a170902ea0300b001d917fa8be8si1205547plg.257.2024.02.12.18.30.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 18:30:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q5qpj6UY; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Q5qpj6UY; 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-1214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1214-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5F482B21597 for ; Tue, 13 Feb 2024 02:14:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C26124690; Tue, 13 Feb 2024 02:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q5qpj6UY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F0snALmO"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q5qpj6UY"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F0snALmO" 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 C7338A937; Tue, 13 Feb 2024 02:14:04 +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=1707790446; cv=none; b=ZbkPJgbR9r4Ar6xGmh0IWnGYinbikgUcYR/oPp1uGfmnrZcv1i5bQ1oKejGZKFXKmFJuNlNwR0hFHgQBvy44R5sSztusdDsCxnM/QzicnL+fVciXcCdptlc47599utaXDxqfCWlb19kHNBOETUuHDgdMVATAAbCRsrOAT149pCI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707790446; c=relaxed/simple; bh=KOnqlMNszEIlSwX+P2d5aY5eD+NpqDq/T3vISrCyP7Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dH7giyPYIfeZ5OT/VPo2f4851iA6lNFQ60qvD8AQf5/f+KuJNZkFAjJDQPMF2EG3xCBD63kUjSwzdMNxrIlnPYflJ7Mk+a5abDBujzENpdFNUjbNDOU6ftnsPRpdkgYk9+6HugBV9scEs1dnaj7vSk+M8tCdqbf+1ddXH/ydl/s= 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=Q5qpj6UY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=F0snALmO; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q5qpj6UY; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=F0snALmO; 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 146A621E2B; Tue, 13 Feb 2024 02:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707790443; 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=fmdpLcH0KspyYreOUudTmM94kWGbFgdXTKIvo+uwB7A=; b=Q5qpj6UYl5fG7t1w15t0BgBKVCItOlkcNRz2sYya+Xq/fytdDuCK7a8238Q1ZHc5UKu6NH nw1pw+xbvguisi/oBj7GNjdwjRLxdwtcRxS/vV8R8QEzDdP1ugm02hNwlzSbvrmlMTeVOj Y85ebNHqC0AFQzJ4PSGWWIXHqVvQQM0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707790443; 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=fmdpLcH0KspyYreOUudTmM94kWGbFgdXTKIvo+uwB7A=; b=F0snALmO1EucW+Hag0frlR+scJlsml5SdSWgTcFk+tmHC8Wklxz+U0TLEAzBonPpfmQ7BK iszs7d6nUyF256AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707790443; 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=fmdpLcH0KspyYreOUudTmM94kWGbFgdXTKIvo+uwB7A=; b=Q5qpj6UYl5fG7t1w15t0BgBKVCItOlkcNRz2sYya+Xq/fytdDuCK7a8238Q1ZHc5UKu6NH nw1pw+xbvguisi/oBj7GNjdwjRLxdwtcRxS/vV8R8QEzDdP1ugm02hNwlzSbvrmlMTeVOj Y85ebNHqC0AFQzJ4PSGWWIXHqVvQQM0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707790443; 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=fmdpLcH0KspyYreOUudTmM94kWGbFgdXTKIvo+uwB7A=; b=F0snALmO1EucW+Hag0frlR+scJlsml5SdSWgTcFk+tmHC8Wklxz+U0TLEAzBonPpfmQ7BK iszs7d6nUyF256AQ== 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 CE63B13A4B; Tue, 13 Feb 2024 02:14:02 +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 Jho4LGrQymU1eAAAD6G6ig (envelope-from ); Tue, 13 Feb 2024 02:14:02 +0000 From: Gabriel Krisman Bertazi To: ebiggers@kernel.org, viro@zeniv.linux.org.uk Cc: jaegeuk@kernel.org, tytso@mit.edu, amir73il@gmail.com, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, brauner@kernel.org, Gabriel Krisman Bertazi Subject: [PATCH v6 10/10] libfs: Drop generic_set_encrypted_ci_d_ops Date: Mon, 12 Feb 2024 21:13:21 -0500 Message-ID: <20240213021321.1804-11-krisman@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213021321.1804-1-krisman@suse.de> References: <20240213021321.1804-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: *** X-Spamd-Bar: +++ Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Q5qpj6UY; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=F0snALmO X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [3.49 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; R_RATELIMIT(0.00)[to_ip_from(RLsauj8dn5fwzrhashi71pkysg)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[10]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_CC(0.00)[kernel.org,mit.edu,gmail.com,vger.kernel.org,lists.sourceforge.net,suse.de]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: 3.49 X-Rspamd-Queue-Id: 146A621E2B 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 capable 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