Message ID | 20240902225511.757831-4-andrealmeid@igalia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32465C54FC6 for <linux-mm@archiver.kernel.org>; Mon, 2 Sep 2024 23:20:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 84B5A8D011A; Mon, 2 Sep 2024 19:20:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FA1C8D00E7; Mon, 2 Sep 2024 19:20:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6EB5B8D011A; Mon, 2 Sep 2024 19:20:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 506C78D00E7 for <linux-mm@kvack.org>; Mon, 2 Sep 2024 19:20:25 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 067931A020B for <linux-mm@kvack.org>; Mon, 2 Sep 2024 23:20:25 +0000 (UTC) X-FDA: 82521369210.22.321E5E8 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf11.hostedemail.com (Postfix) with ESMTP id 30AC040011 for <linux-mm@kvack.org>; Mon, 2 Sep 2024 23:20:22 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=LrVGqvSz; spf=pass (imf11.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725319175; a=rsa-sha256; cv=none; b=xzYIQ/EmlOmPsI2JXcM+QR1uOnbuCFDSvFNF/ankNDi6IjIrZLAabdec+vHVJeIuIg9gVU lLmL71RlPp0f5yOPgxbojUxtgQRLrWwNUxvZ67wLq/XeXK6iXt8bVLeAYM08MDLv88g7YQ wZEXjjrjOanSyXZVnDFXS1iQbQDaRsA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=LrVGqvSz; spf=pass (imf11.hostedemail.com: domain of andrealmeid@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=andrealmeid@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725319175; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7VI+yky5LaYBS1bSHdHAgpXKw65lgRI7FAY05caFqb4=; b=Xwo5StyOkFmMNRXJG43MqKo7OkhIddKgWfHMfxlpAP7GbqpLcxWxm3T8p9cEnzxaFlkv2C CQglKIoVCI0SKAuqqqB/eNeAneTdm61U8oF1OPsAG15hEbbvamc4GuqXWvC//jM0cLsve7 HFnk5kiQ8P23LRqE+CZZlH+M3Q2v3zE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7VI+yky5LaYBS1bSHdHAgpXKw65lgRI7FAY05caFqb4=; b=LrVGqvSzFlJiFx1ovS/TrKYVRm YVRST5UuQ3EQLIqL0oUdhvMxlWx5A94Vvh4Ypwkv3/u/cUfEFG7kGtAcNXrlfb6xgum369T5jm0C7 md4caOkyV5QHRo63Yj/sXiHFNwRBLacDkfqO5nV+uEOiO87mzXrTHRJUbqfPPDCReOfs8J8vVDbck 1J2ODqREXz+7pX94ivq4f/dPT+zJviI7LHrs7lDydHLbSRWJrjzpW2P47+CY/7j8nIraefqXYwKRz EpmcTPJcv8Eh0j4yabBxXcs0aehoFrjfO//6T4VYJIDMjbkQIzgLYerNQaqJrS9x5uUqdhv6REN9R IV1vXBhg==; Received: from [177.172.122.98] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1slFxM-008VrL-H0; Tue, 03 Sep 2024 00:55:32 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= <andrealmeid@igalia.com> To: Hugh Dickins <hughd@google.com>, Andrew Morton <akpm@linux-foundation.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, krisman@kernel.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com, Daniel Rosenberg <drosen@google.com>, smcv@collabora.com, Christoph Hellwig <hch@lst.de>, =?utf-8?q?Andr=C3=A9_Almeida?= <andrealmeid@igalia.com>, Gabriel Krisman Bertazi <gabriel@krisman.be> Subject: [PATCH v2 3/8] ext4: Use utf8_check_strict_name helper Date: Mon, 2 Sep 2024 19:55:05 -0300 Message-ID: <20240902225511.757831-4-andrealmeid@igalia.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240902225511.757831-1-andrealmeid@igalia.com> References: <20240902225511.757831-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Stat-Signature: 7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QMSfwsY iNJak0DInHldTzGuQgnvwVCf3ImpdAnhFDaI91HOuiTt7gB0Omj20OE09WrrSGM12uF+g3vdoYVvqvNYgwRY9gT0LYf8QkXD9Wd1EAoJAFI5azQuIBbOUmQJwzX/9vHZ/MndNlWpfxV0AxstNq9Dw4LspMx9PiZ/9UZ+BXQIF6HnoWIiwea8N0XRWh7YyjT9COqcQGXsLLyodMzrGbLZuUF2VDzbJSua7yhlBhLlOorAOK/1+gq6MrFpJdiOtVysGXhIMWaJZFGz9BCUS7ur47lgFe2wC52evSlEH2CDAOGYs/Z4Xs7NiM87gYFVriUcJR1TX9gCiVnA+Jh7ditQNIbOewgagKBDzSbRfjAF14z/uUogGKna14u4ghUHpYrNvR1GF X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
tmpfs: Add case-insesitive support for tmpfs
|
expand
|
On Mon, Sep 02, 2024 at 07:55:05PM -0300, André Almeida wrote: > Use the helper function to check the requeriments for casefold > directories using strict enconding. > > Suggested-by: Gabriel Krisman Bertazi <gabriel@krisman.be> > Signed-off-by: André Almeida <andrealmeid@igalia.com> Acked-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 6a95713f9193..067face4dc41 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2394,8 +2394,7 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, return -ENOKEY; #if IS_ENABLED(CONFIG_UNICODE) - if (sb_has_strict_encoding(sb) && IS_CASEFOLDED(dir) && - utf8_validate(sb->s_encoding, &dentry->d_name)) + if (!utf8_check_strict_name(dir, &dentry->d_name)) return -EINVAL; #endif
Use the helper function to check the requeriments for casefold directories using strict enconding. Suggested-by: Gabriel Krisman Bertazi <gabriel@krisman.be> Signed-off-by: André Almeida <andrealmeid@igalia.com> --- fs/ext4/namei.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)