diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2026-01-28 14:24:05 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-29 10:06:59 +0100 |
| commit | 55fb177d3a0346106974749374ae2191ba250825 (patch) | |
| tree | a78480682266c70e3d974131fd121c3e17c8141c /fs/exportfs | |
| parent | 1992330d90dd766fcf1730fd7bf2d6af65370ac4 (diff) | |
| download | linux-55fb177d3a0346106974749374ae2191ba250825.tar.gz linux-55fb177d3a0346106974749374ae2191ba250825.tar.bz2 linux-55fb177d3a0346106974749374ae2191ba250825.zip | |
fs: add helpers name_is_dot{,dot,_dotdot}
Rename the helper is_dot_dotdot() into the name_ namespace
and add complementary helpers to check for dot and dotdot
names individually.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://patch.msgid.link/20260128132406.23768-3-amir73il@gmail.com
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/exportfs')
| -rw-r--r-- | fs/exportfs/expfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index d3e55de4a2a2..6c9be60a3e48 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -253,7 +253,8 @@ static bool filldir_one(struct dir_context *ctx, const char *name, int len, container_of(ctx, struct getdents_callback, ctx); buf->sequence++; - if (buf->ino == ino && len <= NAME_MAX && !is_dot_dotdot(name, len)) { + if (buf->ino == ino && len <= NAME_MAX && + !name_is_dot_dotdot(name, len)) { memcpy(buf->name, name, len); buf->name[len] = '\0'; buf->found = 1; |
