erofs: get rid of debug_one_dentry()
Since erofsdump is available, no need to keep this debugging functionality at all. Also drop a useless comment since it's the VFS behavior. Link: https://lore.kernel.org/r/20230114125746.399253-1-xiang@kernel.org Reviewed-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
This commit is contained in:
parent
768bb10afb
commit
e324eaa979
|
@ -6,21 +6,6 @@
|
||||||
*/
|
*/
|
||||||
#include "internal.h"
|
#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,
|
static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx,
|
||||||
void *dentry_blk, struct erofs_dirent *de,
|
void *dentry_blk, struct erofs_dirent *de,
|
||||||
unsigned int nameoff, unsigned int maxsize)
|
unsigned int nameoff, unsigned int maxsize)
|
||||||
|
@ -52,10 +37,8 @@ static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx,
|
||||||
return -EFSCORRUPTED;
|
return -EFSCORRUPTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_one_dentry(d_type, de_name, de_namelen);
|
|
||||||
if (!dir_emit(ctx, de_name, de_namelen,
|
if (!dir_emit(ctx, de_name, de_namelen,
|
||||||
le64_to_cpu(de->nid), d_type))
|
le64_to_cpu(de->nid), d_type))
|
||||||
/* stopped by some reason */
|
|
||||||
return 1;
|
return 1;
|
||||||
++de;
|
++de;
|
||||||
ctx->pos += sizeof(struct erofs_dirent);
|
ctx->pos += sizeof(struct erofs_dirent);
|
||||||
|
|
Loading…
Reference in New Issue