[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191203135651.GU20752@bombadil.infradead.org>
Date: Tue, 3 Dec 2019 05:56:51 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
"Theodore Y. Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <yuchao0@...wei.com>,
Eric Biggers <ebiggers@...nel.org>,
Tyler Hicks <tyhicks@...onical.com>,
linux-fsdevel@...r.kernel.org, ecryptfs@...r.kernel.org,
linux-fscrypt@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [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@...ngson.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?
Powered by blists - more mailing lists