From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E93BC432C0 for ; Tue, 3 Dec 2019 13:57:29 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FB322080A; Tue, 3 Dec 2019 13:57:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="fqiI8G3k"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="P03HdLV6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="K+oWswS7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FB322080A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1ic8g7-0007IE-4i; Tue, 03 Dec 2019 13:57:23 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ic8g6-0007I7-5J for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 Dec 2019 13:57:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pGZjUh8ellhVGI9ssg4DQAJRtWM/oSsrAhWz58uDLYE=; b=fqiI8G3kwxhwfasQ4lkI9QpxDA 2SNse82huYCpP7sV9QlvPoqRGSP42vo07LygqAaLTYQxjEwOj0Anm0BVr8kUmIZ6q26L2JHhFr+j1 1xqKgWJQItDrDtzdWBFyTATR5IecgA1LZBT7AmIBWBPZVP9xHN7L24+dwdphhVsbpxJc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pGZjUh8ellhVGI9ssg4DQAJRtWM/oSsrAhWz58uDLYE=; b=P03HdLV6yDyg+NDRo2Z/pUlqqf EeUlwKOfhY3MkCVHhTqUhSb5EeN1YukZF3zeWOuwf7VqGt2aeVhdqano5kFd6StTU+jR0bG5Q2Cjs Lq0NOVZzQjIRjSuPxdjBRTPIILvQjhMCi79lu5wiuzk+/mMYz2lXOSUnL2FPzxmt/rK8=; Received: from bombadil.infradead.org ([198.137.202.133]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1ic8g4-005plv-8Y for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 Dec 2019 13:57:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pGZjUh8ellhVGI9ssg4DQAJRtWM/oSsrAhWz58uDLYE=; b=K+oWswS7BbZQhmXrTzt62YVxf mKNwgluw/QFfsuhI2q2SwT2RGIfB+UDz+XkbodHVayXzf4yZ7U49NGvpJETvrCpbzXtFKKe0ncN5F z6psPTwUdiyKtaWK2e1noIWYD+8MPgF0q5TJg5ftlWJ0jKgOyoxoykYbaP8J2zz7psj19Eh4snUbU hfs/OXm9cR1EtryubmeT6YOH4/24FbG8gPGIVAQnIfvxnFFjfFQFRCnUIHBOMbBk35mty6yv3ZH+w p1QwiAlusOVQVbSUVFmbnmZjsqCs/12YIeIKqZgxSOg3M5PdmftpMCXuZBdzfMwupQO1aGNv04Zcz c0SdgoDgw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ic8fb-0005Ec-5g; Tue, 03 Dec 2019 13:56:51 +0000 Date: Tue, 3 Dec 2019 05:56:51 -0800 From: Matthew Wilcox To: Tiezhu Yang Message-ID: <20191203135651.GU20752@bombadil.infradead.org> References: <1575377810-3574-1-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1575377810-3574-1-git-send-email-yangtiezhu@loongson.cn> User-Agent: Mutt/1.12.1 (2019-06-15) X-Headers-End: 1ic8g4-005plv-8Y Subject: Re: [f2fs-dev] [PATCH v2] fs: introduce is_dot_dotdot helper for cleanup X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ecryptfs@vger.kernel.org, "Theodore Y. Ts'o" , linux-kernel@vger.kernel.org, Tyler Hicks , Eric Biggers , linux-fscrypt@vger.kernel.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 > --- > > 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? _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel