lkml.org 
[lkml]   [2019]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] fs: introduce is_dot_dotdot helper for cleanup
On Tue, Dec 03, 2019 at 08:56:50PM +0800, Tiezhu Yang wrote:
> There exists many similar and duplicate codes to check "." and "..",
> so introduce is_dot_dotdot helper to make the code more clean.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>
> v2:
> - use the better performance implementation of is_dot_dotdot
> - make it static inline and move it to include/linux/fs.h

Ugh, not more crap in fs.h.

$ ls -l --sort=size include/linux |head
-rw-r--r-- 1 willy willy 154148 Nov 29 22:35 netdevice.h
-rw-r--r-- 1 willy willy 130488 Nov 29 22:35 skbuff.h
-rw-r--r-- 1 willy willy 123540 Nov 29 22:35 pci_ids.h
-rw-r--r-- 1 willy willy 118991 Nov 29 22:35 fs.h

I think this probably fits well in namei.h. And I think it works
better with bare 'name' and 'len' arguments, rather than taking a qstr.

And, as I asked twice in the last round of review, did you benchmark
this change?

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