[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240905190252.461639-3-andrealmeid@igalia.com>
Date: Thu, 5 Sep 2024 16:02:45 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
krisman@...nel.org
Cc: linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
kernel-dev@...lia.com,
Daniel Rosenberg <drosen@...gle.com>,
smcv@...labora.com,
Christoph Hellwig <hch@....de>,
Theodore Ts'o <tytso@....edu>,
André Almeida <andrealmeid@...lia.com>,
Gabriel Krisman Bertazi <gabriel@...sman.be>
Subject: [PATCH v3 2/9] ext4: Use generic_ci_validate_strict_name helper
Use the helper function to check the requirements for casefold
directories using strict encoding.
Suggested-by: Gabriel Krisman Bertazi <gabriel@...sman.be>
Signed-off-by: André Almeida <andrealmeid@...lia.com>
Acked-by: Theodore Ts'o <tytso@....edu>
---
fs/ext4/namei.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 6a95713f9193..beca80e70b0c 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 (!generic_ci_validate_strict_name(dir, &dentry->d_name))
return -EINVAL;
#endif
--
2.46.0
Powered by blists - more mailing lists