Skip to content

Commit 4085f90

Browse files
committed
ksmbd: rename is_dot_dotdot to ksmbd_is_dot_dotdot
is_dot_dotdot() patch merged into stable kernels. It is hard to maintain it using KERNEL_VERSION anymore. So rename is_dot_dotdot to ksmbd_is_dot_dotdot, not using KERNEL_VERSION. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent 6764e76 commit 4085f90

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

vfs.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -2659,13 +2659,11 @@ struct ksmbd_file *ksmbd_vfs_dentry_open(struct ksmbd_work *work,
26592659
}
26602660
#endif
26612661

2662-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
2663-
static inline bool is_dot_dotdot(const char *name, size_t len)
2662+
static inline bool ksmbd_is_dot_dotdot(const char *name, size_t len)
26642663
{
26652664
return len && unlikely(name[0] == '.') &&
26662665
(len == 1 || (len == 2 && name[1] == '.'));
26672666
}
2668-
#endif
26692667

26702668
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
26712669
static bool __dir_empty(struct dir_context *ctx, const char *name, int namlen,
@@ -2677,7 +2675,7 @@ static int __dir_empty(struct dir_context *ctx, const char *name, int namlen,
26772675
struct ksmbd_readdir_data *buf;
26782676

26792677
buf = container_of(ctx, struct ksmbd_readdir_data, ctx);
2680-
if (!is_dot_dotdot(name, namlen))
2678+
if (!ksmbd_is_dot_dotdot(name, namlen))
26812679
buf->dirent_count++;
26822680

26832681
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)

0 commit comments

Comments
 (0)