lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] fs: introduce is_dot_or_dotdot helper for cleanup
On Wed, Dec 11, 2019 at 03:17:11PM +0800, Gao Xiang wrote:
> > static inline bool is_dot_or_dotdot(const unsigned char *name, size_t len)
> > {
> > if (len >= 1 && unlikely(name[0] == '.')) {
>
>
> And I suggest drop "unlikely" here since files start with prefix
> '.' (plus specical ".", "..") are not as uncommon as you expected...

They absolutely are uncommon. Even if you just consider
/home/willy/kernel/linux/.git/config, only one of those six path elements
starts with a '.'.

\
 
 \ /
  Last update: 2019-12-11 14:40    [W:0.075 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site