Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2801477rdb; Mon, 12 Feb 2024 18:14:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiXZRM13qJEfEefbxY9K5LmeG71TGDJeUqDXi6n008uSqIidGvDwUoPFwePv53cz4woXRv2yWUbeknHi0ZMLqwyh0L2K0xVV3G5v3jOA== X-Google-Smtp-Source: AGHT+IEtrlvEQui5sralHFWV1ynJ0Je6aFZBNlSqw79g1FHYA/WlbcPpGVcVEDeyi6cHL2XdoRxv X-Received: by 2002:a05:6808:198d:b0:3be:5d77:cfa7 with SMTP id bj13-20020a056808198d00b003be5d77cfa7mr11362448oib.1.1707790484840; Mon, 12 Feb 2024 18:14:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707790484; cv=pass; d=google.com; s=arc-20160816; b=HAnILWdIl/gdGin3xG/SIJZv48FUAx66LaF5dZkfRip25qieLiBjk/Z0UoLpFawt5A 3sczSU6nAmwhYPPmNC/ohuolTTxtTGancWZhNyGFcNaWvLimKLump+OGkFVSGQu8kb3Z qCGwu+PlyGMR6W47meuidVqXpV73lUwDoeaiRH4pa3FPbvNn2A4P+f0Ra+W+K+UZxKDa sLeDV+we7Gb12iyjQvLkvqnqm8eV6pWvd7Qcy8M89E8iAY+f3AAvk+X3/Jc9YYAZwvPL DmaBJAxGF1J5R6IxW7RpA4f/HRP48HNBPxqDh63fC8ybvIAZQ9v+fJMNds9CAUtM4onE 9FAw== 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=0yxad0c+Twi2XbcMOGXw3MbHwHS+UPlDAflvna90Zes=; b=SBjDZ1a8p6xaw7fEC2fx275Meekf7dL7TwXT5iN+o22lNLAqR2Z9bv2F9XU/4GAciN ZZ3o7WSHFBBhrICGO+/iNPmvnTSoLzMv5V0//5uWmW+SM46o0vTzqj+Sd3Zic6YHx71z PPIR5Ynv88O6GZqJRVRqeIt+wUSAU6njjuSEv86OoWXhbRMvjGNw02MRuHlGfD88dMGZ 4dG/yXwSOLnmVZzey720ROHUyktm5GAM2ySWx7MeYZ+tFNz0nEkxALSpupI0ZlA+b85b bJqegzvcRyPy2/oinrzahjZdi1+Yy7/D4qqAOumjTiUNPTkLrpAe/UI3gn8XNt03RBMP m26g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BJcitR3c; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BJcitR3c; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=eOZcj8er; 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-1212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1212-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; AJvYcCVLUt3pWYILMH80CudRc9Yl4n9GM6bQMB3DBL8MVjwbNF2R0IXKoUNS+nPmYOIzhlhiPZ92rxVczW5PDh7jba487AFlCkWZ5Wdl+yiXQw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e20-20020a633714000000b005d8b7c3a019si1152709pga.856.2024.02.12.18.14.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 18:14:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BJcitR3c; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BJcitR3c; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=eOZcj8er; 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-1212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1212-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 D55A4283105 for ; Tue, 13 Feb 2024 02:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C6938C17; Tue, 13 Feb 2024 02:13:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BJcitR3c"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eOZcj8er"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BJcitR3c"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eOZcj8er" 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 61CCD881E; Tue, 13 Feb 2024 02:13:57 +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=1707790438; cv=none; b=pqRFoK5ZMS3jm3d2Hxn/z1YQNafMF6C4ZhTzb3u8k2mr2flI+n95DPMXhaPtDIt0aD/H5oRpjs8JLvaXjgIHRwaWB2GFX3ByA7gzpeAz11Jh/XBegoNuSdZ8xNXlNnx50YAbCnycrUk7LURKSCAttrhHWttjRcfws420QB5vZbg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707790438; c=relaxed/simple; bh=xdvOyZCyetrCoFBK/1YJbxbSYOwB1nE+htEZH6Bvsf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iUB9EGY2VpyGWPaVAmIHnL8vGZtJobqpGwuhdOVSZYswiib6swjM+FdpjStDWCawTSht2RWzARTkYX2S9EQj1oy5ndzrbpbdVR9z7mMyKXHYZGzxg0fC8lYjXYC4X2Jf7Ai8y0zK5pB0KCLSDO7sjXImZ/wztxCtU0XYsRKL8m8= 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=BJcitR3c; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eOZcj8er; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BJcitR3c; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eOZcj8er; 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 DE7D021E41; Tue, 13 Feb 2024 02:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707790435; 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=BJcitR3cYGIfBTxyiIlgkXn7IGeaUKd3wkNSnfC35RDNY1JfBmUtDRBnm/u8mLBDBgsL5l W5obQMk7VBuA8g0yOCV62My5jTwytHdJQXvRxoRN6C4YnM1PPJ+VliTnMotZUJ8g79malV Q7RLZE1x2vDDr8UBwsOB5spCJQA6oAY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707790435; 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=eOZcj8eryxTCqGYjbIWiwYBMHYjQrFoSrcBezhPlp7GH2qgji2PBXyoRwHwIoLWxGxPKFE pUN3nxlIr5YaMgBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707790435; 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=BJcitR3cYGIfBTxyiIlgkXn7IGeaUKd3wkNSnfC35RDNY1JfBmUtDRBnm/u8mLBDBgsL5l W5obQMk7VBuA8g0yOCV62My5jTwytHdJQXvRxoRN6C4YnM1PPJ+VliTnMotZUJ8g79malV Q7RLZE1x2vDDr8UBwsOB5spCJQA6oAY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707790435; 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=eOZcj8eryxTCqGYjbIWiwYBMHYjQrFoSrcBezhPlp7GH2qgji2PBXyoRwHwIoLWxGxPKFE pUN3nxlIr5YaMgBQ== 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 A74BB13A4B; Tue, 13 Feb 2024 02:13:55 +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 h+vcImPQymUseAAAD6G6ig (envelope-from ); Tue, 13 Feb 2024 02:13:55 +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 08/10] f2fs: Configure dentry operations at dentry-creation time Date: Mon, 12 Feb 2024 21:13:19 -0500 Message-ID: <20240213021321.1804-9-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 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.70 X-Spamd-Result: default: False [3.70 / 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)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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]; NEURAL_HAM_SHORT(-0.20)[-1.000]; 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)[kernel.org,mit.edu,gmail.com,vger.kernel.org,lists.sourceforge.net,suse.de]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[17.33%] 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