From patchwork Sat Jan 14 12:57:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gao Xiang X-Patchwork-Id: 43749 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp279400wrn; Sat, 14 Jan 2023 05:17:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXu5C6VWoSelU0Cghwz9vzwykWbJLM/emdOUd54nI1mZstsOH5I64mHoM2k+rrX9ySbaV2q6 X-Received: by 2002:a17:906:6bc6:b0:86d:f370:19ab with SMTP id t6-20020a1709066bc600b0086df37019abmr920563ejs.5.1673702257197; Sat, 14 Jan 2023 05:17:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673702257; cv=none; d=google.com; s=arc-20160816; b=Z2dzWLzD3vNSKaUZvTuBQa9e4BLbtC0HbGvgCSJAcFXHACY7MZQ/whyCIF+WM1VXYR 8Dd70FlBqyuHLTnUBLo33SswtVLsCjpv625kxZvzFQSWf3AW307WFX0f2S5H6kZxBSid 8JSEqrEIJmUP3FrZKnuDGArmIJs6qyE0RpcJymyHD5Y8VBIvD/2L3QkJa/I920IytvgE Xqu/infuKv1oGQHP9W4kFxCeDryJ/a03XXNntg9Nf4IEjKAlNFjrpaUToSjyXq1wGwS3 ENwL9jIKXX8xVH3vc5HbN35CoYptHnN+Z7Sl5SaCuhxlQAJPFqVdGeJfkRswP78xOzF2 3uOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lpXVxyZWgvEnk4Iq6F1nMwD2g+6WKKNyec+xFan2pSE=; b=fhNx3R/DTNOkinJOEI4ht7FN87stiAS2porowCEKfHZObi7IlMTuKNiaUjI0AKq4ro jmwBIOf/37AZ0u3H0fDu3KgxIi1bhTbls/B8aJCu0iedP4g1UA+KZC07UJsuHgmeOgsh T2VYaTOBwXGcgl5xGMqzMrn714NYsp8ymPfPGaplgMd05SC0AGyjNxAafkp1YeHzVXh/ 7TWq8Mm7v9gfEjJ6ru+stlWv17QCfQGSgK4/CiEKYsc2xxAS4RCbJQWwaWXmgZqiLKKD KCdTNFn/R0IGJtcXgW44IkfiY4+/UtXBaJc0jfhqO0+BhGMwNbVTJAVp/VcOGO9DDXhP d9XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAHizgaA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xf9-20020a17090731c900b0084d0b4b4fdbsi25612845ejb.555.2023.01.14.05.17.13; Sat, 14 Jan 2023 05:17:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAHizgaA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229566AbjANM6M (ORCPT + 99 others); Sat, 14 Jan 2023 07:58:12 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755004018489816468?= X-GMAIL-MSGID: =?utf-8?q?1755004018489816468?= 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 Reviewed-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Chao Yu --- 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);