From: Gao Xiang <xiang@kernel.org>
To: linux-erofs@lists.ozlabs.org, Chao Yu <chao@kernel.org>,
Yue Hu <huyue2@coolpad.com>,
Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] erofs: get rid of debug_one_dentry()
Date: Sat, 14 Jan 2023 20:57:45 +0800 [thread overview]
Message-ID: <20230114125746.399253-1-xiang@kernel.org> (raw)
From: Gao Xiang <hsiangkao@linux.alibaba.com>
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 <hsiangkao@linux.alibaba.com>
---
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
next reply other threads:[~2023-01-14 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 12:57 Gao Xiang [this message]
2023-01-14 12:57 ` [PATCH 2/2] erofs: simplify iloc() Gao Xiang
2023-01-14 15:08 ` [PATCH v2 " Gao Xiang
2023-01-16 1:52 ` Yue Hu
2023-01-16 2:22 ` Jingbo Xu
2023-02-14 13:44 ` Chao Yu
2023-01-16 2:24 ` [PATCH 1/2] erofs: get rid of debug_one_dentry() Jingbo Xu
2023-01-16 2:47 ` Yue Hu
2023-02-14 13:40 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230114125746.399253-1-xiang@kernel.org \
--to=xiang@kernel.org \
--cc=chao@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).