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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34347C3DA78 for ; Sat, 14 Jan 2023 12:58:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229582AbjANM6N (ORCPT ); Sat, 14 Jan 2023 07:58:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjANM6L (ORCPT ); Sat, 14 Jan 2023 07:58:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C08BE8A51 for ; Sat, 14 Jan 2023 04:58:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4AFE16091F for ; Sat, 14 Jan 2023 12:58:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF333C433EF; Sat, 14 Jan 2023 12:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673701088; bh=vD+R0I/+XGCpx3ixVZETPZPrWFSY/wd9ViAO+3HiKA8=; h=From:To:Cc:Subject:Date:From; b=MAHizgaAGK4UjLpHpTuBL8u+ujeeQm9FMSmRsrz56wUUmzBwUfH2Cygm+YE34KrYE Rj+cJSq4bF3xbzP0liu1AGzpZYyTIXI80E3V6J0jAx3GwwVke/p04tXpOb+up96g5H wt15siRsXSXn75N00mAIJ9EUxaMTp1eVIu7zLRKfLnQcHfjoKttiXxarSR4CWvOgIF ZadcO3HLTkFV1ePRtPDffVgxHqojiAlC3ANy62KoDe4zcNhAzJHLlVv/QD7uNeT21X hTne/2fnf/A5C72M5B/IEC3yh2Q8j6fCp2aRtEGaUDX8MuRz6IHEWlJDXlNCvV11jm YWuRN1rTQqqPg== From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu , Yue Hu , Jingbo Xu Cc: LKML , Gao Xiang Subject: [PATCH 1/2] erofs: get rid of debug_one_dentry() Date: Sat, 14 Jan 2023 20:57:45 +0800 Message-Id: <20230114125746.399253-1-xiang@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gao Xiang Since erofsdump is available, no need to keep this debugging functionality at all. Also drop a useless comment since it's the VFS behavior. Signed-off-by: Gao Xiang --- fs/erofs/dir.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c index ecf28f66b97d..6970b09b8307 100644 --- a/fs/erofs/dir.c +++ b/fs/erofs/dir.c @@ -6,21 +6,6 @@ */ #include "internal.h" -static void debug_one_dentry(unsigned char d_type, const char *de_name, - unsigned int de_namelen) -{ -#ifdef CONFIG_EROFS_FS_DEBUG - /* since the on-disk name could not have the trailing '\0' */ - unsigned char dbg_namebuf[EROFS_NAME_LEN + 1]; - - memcpy(dbg_namebuf, de_name, de_namelen); - dbg_namebuf[de_namelen] = '\0'; - - erofs_dbg("found dirent %s de_len %u d_type %d", dbg_namebuf, - de_namelen, d_type); -#endif -} - static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx, void *dentry_blk, struct erofs_dirent *de, unsigned int nameoff, unsigned int maxsize) @@ -52,10 +37,8 @@ static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx, return -EFSCORRUPTED; } - debug_one_dentry(d_type, de_name, de_namelen); if (!dir_emit(ctx, de_name, de_namelen, le64_to_cpu(de->nid), d_type)) - /* stopped by some reason */ return 1; ++de; ctx->pos += sizeof(struct erofs_dirent); -- 2.30.2