Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp625109rdb; Mon, 29 Jan 2024 12:45:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/zo0OSBL7gckmXlwWqfjFPNu78Crfp0da54/TyOSsnq56aSpiKnzRgro/oU6BvtvHKpB2 X-Received: by 2002:a17:90a:420d:b0:290:1966:cc84 with SMTP id o13-20020a17090a420d00b002901966cc84mr7561447pjg.1.1706561113402; Mon, 29 Jan 2024 12:45:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706561113; cv=pass; d=google.com; s=arc-20160816; b=M0rAzjtiAT5fmGEtbz4alfYZO4dbFdNi7Tct4bv+uJ6S+IoUH7BZ2nrWw019dVpLod jxur8caAZpHfBf6khNmMjAtYHgKsZlIkfM/An3dgt8REphQzEZL2dcqoIrWFiabCRQGg W4ILTr0HXDzw7l7LonNMMjMfRuWl+/1ZCQUkJc+YkrTpHZRyjIO99XY3nHNpYyWJPmnr qHNgNS+kpz65xLtjbIM0Srw1Vi5pzLWWvV98D9Xcd6mrD0lUen1HVbvj/slxdv9PPlT/ AaarVX710Y7fQ7U9pPM0y0G5RU73AwDPdfgHi8Aiu8IkmnG6H6ZtpOKZ2MsZEOvc3KZ+ n9Qw== 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=M648oune0DwZmCHpgeKmdqyNG9Pnhrh1APj5VeeCjyQ=; b=xsazYUcUdLAehg+mA6VUSBzbUonSNqFgaaNY3H6MYBJ5oRzDpXP7mjwFgYTj+skVEn pFDHOrTLjtZBXWn66dD6+wTf0mTgI4xO5NgUOsfW7Ca1Vhkl1HrPraYIWYMIRN64eNMV 9nmuqW1R3Vg4O4pf2V08Bb2DP+93Vd5s+hxsGBvLoxkHHrMq8e/bTMgeU3rcY8lVlCG5 mZRgXAl0Z8GyVkgrxusSRNrgKBPOV6VsuQ9NfMa3nAfeZBhGJIOb5ielpUq5ZisAh3xc ydHHw5g2/l0awMdOM7aY7tDufJ6CLewxsvxXinneR7D1MVhprfBSp1WBKeBZnOLUp/Uo cyow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lYOH9VNB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lYOH9VNB; 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-1009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q20-20020a17090aa01400b002940f6fa8a5si5981341pjp.54.2024.01.29.12.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 12:45:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lYOH9VNB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lYOH9VNB; 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-1009-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1009-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8507E288C7D for ; Mon, 29 Jan 2024 20:45:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E343159592; Mon, 29 Jan 2024 20:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="lYOH9VNB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="moGiH92V"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="lYOH9VNB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="moGiH92V" 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 866E3159577; Mon, 29 Jan 2024 20:44:15 +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=1706561057; cv=none; b=ixl5do7IM1yBlcbvJWArsQc1QXvYbkCDNPO8abiyuBpY2MMKoaC+soiPGDNU09QpP9lKT1soHCT3Y/k6F5cdEiF0ESPveYvSqb/HCdbXYInG824vUdtEHnzhf6veDA75zkqFqWkT1wH9rrqT/MFgVv8glB3hsjPooNdO1FHmCSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706561057; c=relaxed/simple; bh=xdvOyZCyetrCoFBK/1YJbxbSYOwB1nE+htEZH6Bvsf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ii+D5UF/i6Fv5W80vJ5K38Qg4igXF3ZLyQsiXj9+dLuYkbuFrijpC8xvKFGIR9ONDViOqhqri/zRjGT6fUut1XrRdzp5sWbYd0F3u41/SITYi0yS5fRfFsqtrAxS34e0Gf9ntp3T6HeIiZZHV6ZIq85prY0z6bCD9T2FCVDdcfE= 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=lYOH9VNB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=moGiH92V; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=lYOH9VNB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=moGiH92V; 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 [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 B065D21E90; Mon, 29 Jan 2024 20:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706561053; 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=lYOH9VNBq37wf1pK1VtMJ51LjuJFOyu15hNf31Mk8BvZ1GwQ7L7jBaRFik6PT44y0cWIrT Ei7kXnJPX65wQnFrmYosH5cMJ2sbCLhuJXWzGLl0iyHEsDb/c7zXnWuiFgeYg9xCc3spoG t6PQZuu9iP3UXKh7y5RQ2EU8CVf1tnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706561053; 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=moGiH92VSwWhrw2FpXg3fyUxpbG2+4NzU5TzwpoOWHtMP/jTqhd0K02bLUHiHHCBejIadQ 6LaK+2tXKjBVOKDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706561053; 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=lYOH9VNBq37wf1pK1VtMJ51LjuJFOyu15hNf31Mk8BvZ1GwQ7L7jBaRFik6PT44y0cWIrT Ei7kXnJPX65wQnFrmYosH5cMJ2sbCLhuJXWzGLl0iyHEsDb/c7zXnWuiFgeYg9xCc3spoG t6PQZuu9iP3UXKh7y5RQ2EU8CVf1tnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706561053; 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=moGiH92VSwWhrw2FpXg3fyUxpbG2+4NzU5TzwpoOWHtMP/jTqhd0K02bLUHiHHCBejIadQ 6LaK+2tXKjBVOKDw== 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 140F212FF7; Mon, 29 Jan 2024 20:44:12 +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 jDB3LxwOuGX2DAAAD6G6ig (envelope-from ); Mon, 29 Jan 2024 20:44:12 +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 10/12] f2fs: Configure dentry operations at dentry-creation time Date: Mon, 29 Jan 2024 17:43:28 -0300 Message-ID: <20240129204330.32346-11-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 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,vger.kernel.org,lists.sourceforge.net,suse.de]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO 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