2023-01-14 13:44:25

by Gao Xiang

[permalink] [raw]
Subject: [PATCH 1/2] erofs: get rid of debug_one_dentry()

From: Gao Xiang <[email protected]>

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 <[email protected]>
---
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


2023-01-16 02:27:14

by Jingbo Xu

[permalink] [raw]
Subject: Re: [PATCH 1/2] erofs: get rid of debug_one_dentry()



On 1/14/23 8:57 PM, Gao Xiang wrote:
> From: Gao Xiang <[email protected]>
>
> 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 <[email protected]>

The code LGTM.

Reviewed-by: Jingbo Xu <[email protected]>


--
Thanks,
Jingbo

2023-01-16 02:59:41

by Yue Hu

[permalink] [raw]
Subject: Re: [PATCH 1/2] erofs: get rid of debug_one_dentry()

On Sat, 14 Jan 2023 20:57:45 +0800
Gao Xiang <[email protected]> wrote:

> From: Gao Xiang <[email protected]>
>
> 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 <[email protected]>

Reviewed-by: Yue Hu <[email protected]>

2023-02-14 13:41:07

by Chao Yu

[permalink] [raw]
Subject: Re: [PATCH 1/2] erofs: get rid of debug_one_dentry()

On 2023/1/14 20:57, Gao Xiang wrote:
> From: Gao Xiang <[email protected]>
>
> 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 <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,