Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1191131rdb; Fri, 19 Jan 2024 10:53:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuBb68HZ/oPK/NZDIF00f/PQEPKU1zOM5vWWBt2yID+qHWbP6ie8FrcqDTwJu9hQZ8IQFH X-Received: by 2002:a17:90a:d705:b0:28c:374f:8028 with SMTP id y5-20020a17090ad70500b0028c374f8028mr198993pju.27.1705690393073; Fri, 19 Jan 2024 10:53:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705690393; cv=pass; d=google.com; s=arc-20160816; b=NorpQ56seyG4veeIaxZ7Eliof+Rs4U9lZsKpAa1tyGyDod4CvYq4iUZFs6nWe4migV CRgrUVLTOp4ddpft+DfTb85OMCu/VJ4OI52Se6xuugKZgUR9Zz1ZRvRH7Dra22dN4eP+ 5WNSV9j92qyJNjpSqKhIzA3sI+FmYZSNO6qhIsMtv/prc+Sk3qxe4APnlicEEhgupyJQ /IIqmGS3zhenhDzVLck47MnM4kE3wRCJxu9C08E9hCzRWhXruwDSi2BdeTOFhhi/h0k4 Lelle5XoyI4GyhNzl2mINZlKpBf15qihJqV50Vb3/0wfiS2lHzceNJWq5EDqGSivGRw+ bAOg== 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=tlx4z3N508ykO+IPN4KGQgLY91vQLkOc0l8vpLCa86g=; fh=TR5Gg30v3tsunp9zlnj9BCAk32Yv/gHGLFfg9mPqX30=; b=iz8oF9CcfaCr3bQb2pqtQsyjLHxJXYbF3rhADbA2WCvQURcDHwuVxSLROeY2CgTr9b lx+01gb1xLRok8l8IkBaOzm3lAlwOrCDR9Iz0iqq3wjOiqZ0V+K10vrkZHjEfilTwPJq 2T2WgBJo7kYPYLWcoc3RM9GaDgvnNDCrw02wrUnofZw9NGsmHxYhwAwe576UPKMJQw/4 8V0vptrQG15ToEfJUAtgUBLOF2+DBr0hle3ZF3yedFQaWmEysO93Yf9Ophz5tdttYUl7 uKLCOSs8gSRJ+h4h9bm7aNoy097vAqX5Bht6EqlL0NfdOmDLT423B3S02Rp2QN0gYItG 14kA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UWR4ZyxA; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=sU7vc5cK; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UWR4ZyxA; 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-860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z6-20020a17090ad78600b0029047014c34si1937398pju.126.2024.01.19.10.53.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 10:53:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UWR4ZyxA; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=sU7vc5cK; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UWR4ZyxA; 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-860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-860-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 0EBA5B212FC for ; Fri, 19 Jan 2024 18:49:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56E6156472; Fri, 19 Jan 2024 18:48:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UWR4ZyxA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="sU7vc5cK"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UWR4ZyxA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="sU7vc5cK" 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 889091E4A4; Fri, 19 Jan 2024 18:48:43 +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=1705690124; cv=none; b=qqMcRR5vUQv/SYpyknZ1DM/aXgw6BDQGXSl5XMZb1KiJs8fddXXM67RBmyi2mdbDuNClPRxwZdYsVtk2tmlS4j9w4j3mOoMO7Cm0bNfsURnpxAOOE4lXpWORiZNyRuFPteO8vZoKnsMtRM/jhjeV5MpjUSDRmw8PGbfsVvtLfM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705690124; c=relaxed/simple; bh=xdvOyZCyetrCoFBK/1YJbxbSYOwB1nE+htEZH6Bvsf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GdLsDbZ38f4nkwehq/rmuXwVaXvkgBWP+n+sM+wH6+IfBYq8NxrsyJ6xJKW0AAhvCNKDmCwxhm8VplGsFLcsaD+vr9wQg3pERyc8vUZ7iEgYugY5T+Do8E3QBMaySwavtZ6Icr/RSEvVw9FTf2Nj/hu44hWCo4KuWKpOk8dIgUo= 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=UWR4ZyxA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=sU7vc5cK; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UWR4ZyxA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=sU7vc5cK; 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 B37721F809; Fri, 19 Jan 2024 18:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705690121; 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=tlx4z3N508ykO+IPN4KGQgLY91vQLkOc0l8vpLCa86g=; b=UWR4ZyxATSDjUEZz0rfQruQGIXWuNud7FGBkSCLC8RO2rS24lIdUYlSD3V0b2N/0P31cZH 33HBkJAQR8ovZrZFg7zQGgBv37CWyArYzX3GIkmZ9QSzHml09PEMrElP3VY9FWNqvnWUUY Mxe1eOfHRLskCgyopH48bK1zkiTzZQ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705690121; 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=tlx4z3N508ykO+IPN4KGQgLY91vQLkOc0l8vpLCa86g=; b=sU7vc5cKSs3xcrdT3A0ZKtFstONxHFiwwfeFVuuomZJITBJr9Vd/Ovt5nBzM6EzcNSpFU3 n3S3eJONj+1LcQBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705690121; 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=tlx4z3N508ykO+IPN4KGQgLY91vQLkOc0l8vpLCa86g=; b=UWR4ZyxATSDjUEZz0rfQruQGIXWuNud7FGBkSCLC8RO2rS24lIdUYlSD3V0b2N/0P31cZH 33HBkJAQR8ovZrZFg7zQGgBv37CWyArYzX3GIkmZ9QSzHml09PEMrElP3VY9FWNqvnWUUY Mxe1eOfHRLskCgyopH48bK1zkiTzZQ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705690121; 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=tlx4z3N508ykO+IPN4KGQgLY91vQLkOc0l8vpLCa86g=; b=sU7vc5cKSs3xcrdT3A0ZKtFstONxHFiwwfeFVuuomZJITBJr9Vd/Ovt5nBzM6EzcNSpFU3 n3S3eJONj+1LcQBA== 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 16D74136F5; Fri, 19 Jan 2024 18:48:40 +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 ngUCMwjEqmVwDAAAD6G6ig (envelope-from ); Fri, 19 Jan 2024 18:48:40 +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 08/10] f2fs: Configure dentry operations at dentry-creation time Date: Fri, 19 Jan 2024 15:47:40 -0300 Message-ID: <20240119184742.31088-9-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 This was already the case for case-insensitive before commit bb9cd9106b22 ("fscrypt: Have filesystems handle their d_ops"), but it was changed to set at lookup-time to facilitate the integration with fscrypt. But it's a problem because dentries that don't get created through ->lookup() won't have any visibility of the operations. Since fscrypt now also supports configuring dentry operations at creation-time, do it for any encrypted and/or casefold volume, simplifying the implementation across these features. Signed-off-by: Gabriel Krisman Bertazi --- fs/f2fs/namei.c | 1 - fs/f2fs/super.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index d0053b0284d8..b40c6c393bd6 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -532,7 +532,6 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, } err = f2fs_prepare_lookup(dir, dentry, &fname); - generic_set_encrypted_ci_d_ops(dentry); if (err == -ENOENT) goto out_splice; if (err) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 033af907c3b1..abfdb6e25b1c 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4663,6 +4663,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) goto free_node_inode; } + generic_set_sb_d_ops(sb); sb->s_root = d_make_root(root); /* allocate root dentry */ if (!sb->s_root) { err = -ENOMEM; -- 2.43.0