From: Gao Xiang <xiang@kernel.org>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <xiang@kernel.org>
Subject: [PATCH 1/2] erofs-utils: lib: get rid of unused erofs_ftype_to_dtype()
Date: Wed, 7 Oct 2026 22:49:08 +0200 [thread overview]
Message-ID: <20261007204909.19426-1-xiang@kernel.org> (raw)
It has been unused since commit 9fd2a2250fa9 ("erofs-utils: fuse: switch
to FUSE 2/3 lowlevel APIs").
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
include/erofs/inode.h | 1 -
lib/inode.c | 19 -------------------
2 files changed, 20 deletions(-)
diff --git a/include/erofs/inode.h b/include/erofs/inode.h
index 23848e8..5b67b95 100644
--- a/include/erofs/inode.h
+++ b/include/erofs/inode.h
@@ -28,7 +28,6 @@ struct erofs_importer;
u32 erofs_new_encode_dev(dev_t dev);
unsigned char erofs_mode_to_ftype(umode_t mode);
umode_t erofs_ftype_to_mode(unsigned int ftype, unsigned int perm);
-unsigned char erofs_ftype_to_dtype(unsigned int filetype);
void erofs_inode_manager_init(void);
void erofs_insert_ihash(struct erofs_inode *inode);
void erofs_remove_ihash(struct erofs_inode *inode);
diff --git a/lib/inode.c b/lib/inode.c
index d819659..da29b5a 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -54,17 +54,6 @@ unsigned char erofs_mode_to_ftype(umode_t mode)
return erofs_ftype_by_mode[(mode & S_IFMT) >> S_SHIFT];
}
-static const unsigned char erofs_dtype_by_ftype[EROFS_FT_MAX] = {
- [EROFS_FT_UNKNOWN] = DT_UNKNOWN,
- [EROFS_FT_REG_FILE] = DT_REG,
- [EROFS_FT_DIR] = DT_DIR,
- [EROFS_FT_CHRDEV] = DT_CHR,
- [EROFS_FT_BLKDEV] = DT_BLK,
- [EROFS_FT_FIFO] = DT_FIFO,
- [EROFS_FT_SOCK] = DT_SOCK,
- [EROFS_FT_SYMLINK] = DT_LNK
-};
-
static const umode_t erofs_dtype_by_umode[EROFS_FT_MAX] = {
[EROFS_FT_UNKNOWN] = S_IFMT,
[EROFS_FT_REG_FILE] = S_IFREG,
@@ -84,14 +73,6 @@ umode_t erofs_ftype_to_mode(unsigned int ftype, unsigned int perm)
return erofs_dtype_by_umode[ftype] | perm;
}
-unsigned char erofs_ftype_to_dtype(unsigned int filetype)
-{
- if (filetype >= EROFS_FT_MAX)
- return DT_UNKNOWN;
-
- return erofs_dtype_by_ftype[filetype];
-}
-
static struct list_head erofs_ihash[65536];
static erofs_rwsem_t erofs_ihashlock;
--
2.50.1 (Apple Git-155)
next reply other threads:[~2026-10-07 20:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 20:49 Gao Xiang [this message]
2026-10-07 20:49 ` [PATCH 2/2] erofs-utils: tar: Fix printing uninitialized memory from xattr value Gao Xiang
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=20261007204909.19426-1-xiang@kernel.org \
--to=xiang@kernel.org \
--cc=linux-erofs@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.