Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2495871rdb; Wed, 21 Feb 2024 09:16:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpiQn3IVzn3XNH0zpPzjkyA2LtJoe/DDuxnAWn2rHP8KidtV54EQu9SCafej1paDisWT6idz8UHp+JsQliFpC3TZ4JBOQ9uEXI1j/7ww== X-Google-Smtp-Source: AGHT+IGQ7GcpOAK+RbeZyB9YBQtAN6hXU6CNHxaQCu0xKJSJx0YKHmR37+tF3NBSvnIRBsILNkrk X-Received: by 2002:a17:902:8496:b0:1db:47bb:65d6 with SMTP id c22-20020a170902849600b001db47bb65d6mr15440337plo.58.1708535767636; Wed, 21 Feb 2024 09:16:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708535767; cv=pass; d=google.com; s=arc-20160816; b=xiUkZ3/HcxQJRxGfYPbTjgJYuAiQ/K1x4PUk2wm7eRS+sjPYn2dYDsbyRT3wIBGv7U EGlpTfKWvmcIZZ/OHtqWuGTu2xll4L0teo0mDQcsuvMkIV+psUA69BmlZvnijvaMzLq+ eL/2b7l6HRLGZkRffBw9dt4EPnrTwq3GmnhKv5vFRaTP9oXKz8WKKELvGmYY9oJ5o1VU aX+rLPEP+A3aNlxqVAl5ziicl4wNTx4yroZM8NdDWEtQQy2x3l03ylQa7QfjE5wrmxp/ wupXrT3krBkSzSZuODAvLF3zi9cDp9DHK3PnO9BcBXcnZBT9Wf8gKyyaCa8FXhLETC6/ vwUg== 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=8tdzVCq0eMaTapAm4yEzDtdxr6Vp38VIgLMUbBssKM0=; b=Y5qyEOD5+qNkTLdoKvLoB9No3TYBj/SjolwfXS3CbOsilXZtYPvXt9n+KsOoorcq5r 3lzOJQSEmu8SNbA/OtLR3mXYkphd3nIlVBtw58k6Wq1PsVA0jHUKvUG47azJbm3YnbbQ 4Aq1HwF0liWNSynegqjGX67YnF1GiNSqDmi5TCqYsHgIGSQO9KQGaK1ca7nyLt77s6AP Cc+N+1p7SBFvbAONZOhQNyFzBuBSorQv892yMQSbbKN891iwAUfPjsFz3sIKeREPxfOF /HD0o3hIb8iEnb/dAxVeJ+qopQhUTejtgjAGq4BONfhm7Gikt5DC4ClixQkYNfS+X6Kb Yxwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=yN4+1dDU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=a5poqQ+N; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=6udgHJlo; 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-1349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1349-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q18-20020a170902f79200b001dc3c4d18efsi799480pln.293.2024.02.21.09.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 09:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1349-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=yN4+1dDU; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=a5poqQ+N; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=6udgHJlo; 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-1349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1349-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 93501B20E1A for ; Wed, 21 Feb 2024 17:15:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 704B584FC9; Wed, 21 Feb 2024 17:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="yN4+1dDU"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+etsd3JM"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="a5poqQ+N"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6udgHJlo" 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 835521DA32; Wed, 21 Feb 2024 17:14:45 +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=1708535687; cv=none; b=XITTKN9wqyA1xocMM5L7Yv/xU18Bp5MWABhlc95EmXrPrB3buBQMIz5Mp49wM72GP7DbGh7T4S8idt5CpMHfOesm+pNU4s1WiLthttIhSdC9Ddh7s6O1Jp6ZFeGyIg5m1WvUi0YpSPnysA625vdnhVnw4np+4LHT1S9R2oBYlDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708535687; c=relaxed/simple; bh=xdvOyZCyetrCoFBK/1YJbxbSYOwB1nE+htEZH6Bvsf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SsM6kMCpeC26bIMCIZAiFEbFERuFfl0DSfYaliFyUBNjEUmb9K7ljvBWhd7XOr61AgGKrzrY9i6OMWFBDm6iznJxiVVVm6F5iVNLeO0s34F1rEzV8kU/JeuA9tjDQkITbRcrX2LpKGDvHcYt17U7juTLRGLOSPCFYPeEfUe9AlQ= 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=yN4+1dDU; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+etsd3JM; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=a5poqQ+N; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6udgHJlo; 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 EA7BA1FB6D; Wed, 21 Feb 2024 17:14:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708535684; 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=yN4+1dDUqQfi2PIsNy4q8hUHfGMLPkW9nhVokV61+ldGvLUkTCSXzcMpatl7rzvIRY8l0+ eZrwldCL1ySOmQ4ILfA/x49ICxhfdqIyPYUact4qCJszsIRUoV8zuBhLZzazpt2+HR3VCl 1YSrMJ7MkhDjtruVON/racChVHRZlG8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708535684; 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=+etsd3JMnAUWS7m7TnKNWD3bHlYBlRMZgVjNvau94ADdQZAdJyCUnR7EDBPuQZKUz7/n/S 669dkkWZsxPKc0Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708535683; 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=a5poqQ+NH64tETu/KoHgYZgDGYTBW/TJid6gpdbWv9jmWdukmUvnd+aAr7bGvFQQVIsbF6 6i+2pCNmxN9+vATcj0Tjrx3ueA+YgvZtiiUB9BHJTrBhgyfIxAqX7fBRY5pind1PHxkddK ElyN0MMOmfE4X4v35HTdCVB+o9GAyQg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708535683; 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=6udgHJlo4nLtwQ4RfBX9nrZ7lxlQvFVYAkpI693Wuf3xvEFZB5mVqW3a5ifBYoISd/z8QZ 6T5SQhaALlYtvMBw== 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 9CB2F139D0; Wed, 21 Feb 2024 17:14:43 +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 S8oOH4Mv1mV3KgAAD6G6ig (envelope-from ); Wed, 21 Feb 2024 17:14:43 +0000 From: Gabriel Krisman Bertazi To: ebiggers@kernel.org, viro@zeniv.linux.org.uk, jaegeuk@kernel.org Cc: 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 v7 08/10] f2fs: Configure dentry operations at dentry-creation time Date: Wed, 21 Feb 2024 12:14:10 -0500 Message-ID: <20240221171412.10710-9-krisman@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240221171412.10710-1-krisman@suse.de> References: <20240221171412.10710-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)[10]; 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)[mit.edu,gmail.com,vger.kernel.org,lists.sourceforge.net,kernel.org,suse.de]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[19.53%] 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