mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ntfs3: ntfs3 fs_umode_to_dtype not in abi list [1/1]
PD#SWPL-169224 Problem: ntfs3 fs_umode_to_dtype not in abi list Solution: ntfs3 fs_umode_to_dtype not in abi list Verify: local Change-Id: Ibf190585f7606539b5df98151e8dd617ad66c9da Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
This commit is contained in:
@@ -272,6 +272,18 @@ out:
|
||||
return err == -ENOENT ? NULL : err ? ERR_PTR(err) : inode;
|
||||
}
|
||||
|
||||
#if IS_MODULE(CONFIG_NTFS3_FS)
|
||||
static const unsigned char fs_ftype_by_dtype[DT_MAX] = {
|
||||
[DT_REG] = FT_REG_FILE,
|
||||
[DT_DIR] = FT_DIR,
|
||||
[DT_LNK] = FT_SYMLINK,
|
||||
[DT_CHR] = FT_CHRDEV,
|
||||
[DT_BLK] = FT_BLKDEV,
|
||||
[DT_FIFO] = FT_FIFO,
|
||||
[DT_SOCK] = FT_SOCK,
|
||||
};
|
||||
#endif
|
||||
|
||||
static inline int ntfs_filldir(struct ntfs_sb_info *sbi, struct ntfs_inode *ni,
|
||||
const struct NTFS_DE *e, u8 *name,
|
||||
struct dir_context *ctx)
|
||||
@@ -330,7 +342,11 @@ static inline int ntfs_filldir(struct ntfs_sb_info *sbi, struct ntfs_inode *ni,
|
||||
ino != ni->mi.rno) {
|
||||
struct inode *inode = ntfs_iget5(sbi->sb, &e->ref, NULL);
|
||||
if (!IS_ERR_OR_NULL(inode)) {
|
||||
#if IS_MODULE(CONFIG_NTFS3_FS)
|
||||
dt_type = fs_ftype_to_dtype(fs_ftype_by_dtype[S_DT(inode->i_mode)]);
|
||||
#else
|
||||
dt_type = fs_umode_to_dtype(inode->i_mode);
|
||||
#endif
|
||||
iput(inode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user