]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/ocfs2/ocfs2_fs.h
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / fs / ocfs2 / ocfs2_fs.h
index 7071ad0dec900051b1e98dce260a1002c8dea06b..b86bf5e743484d27c2d7a1640408e277f20c7c0a 100644 (file)
@@ -391,21 +391,6 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
 #define OCFS2_HB_LOCAL                 "heartbeat=local"
 #define OCFS2_HB_GLOBAL                        "heartbeat=global"
 
-/*
- * OCFS2 directory file types.  Only the low 3 bits are used.  The
- * other bits are reserved for now.
- */
-#define OCFS2_FT_UNKNOWN       0
-#define OCFS2_FT_REG_FILE      1
-#define OCFS2_FT_DIR           2
-#define OCFS2_FT_CHRDEV                3
-#define OCFS2_FT_BLKDEV                4
-#define OCFS2_FT_FIFO          5
-#define OCFS2_FT_SOCK          6
-#define OCFS2_FT_SYMLINK       7
-
-#define OCFS2_FT_MAX           8
-
 /*
  * OCFS2_DIR_PAD defines the directory entries boundaries
  *
@@ -424,17 +409,6 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
 #define        OCFS2_LINKS_HI_SHIFT    16
 #define        OCFS2_DX_ENTRIES_MAX    (0xffffffffU)
 
-#define S_SHIFT                        12
-static unsigned char ocfs2_type_by_mode[S_IFMT >> S_SHIFT] = {
-       [S_IFREG >> S_SHIFT]  = OCFS2_FT_REG_FILE,
-       [S_IFDIR >> S_SHIFT]  = OCFS2_FT_DIR,
-       [S_IFCHR >> S_SHIFT]  = OCFS2_FT_CHRDEV,
-       [S_IFBLK >> S_SHIFT]  = OCFS2_FT_BLKDEV,
-       [S_IFIFO >> S_SHIFT]  = OCFS2_FT_FIFO,
-       [S_IFSOCK >> S_SHIFT] = OCFS2_FT_SOCK,
-       [S_IFLNK >> S_SHIFT]  = OCFS2_FT_SYMLINK,
-};
-
 
 /*
  * Convenience casts
@@ -1629,7 +1603,7 @@ static inline int ocfs2_sprintf_system_inode_name(char *buf, int len,
 static inline void ocfs2_set_de_type(struct ocfs2_dir_entry *de,
                                    umode_t mode)
 {
-       de->file_type = ocfs2_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
+       de->file_type = fs_umode_to_ftype(mode);
 }
 
 static inline int ocfs2_gd_is_discontig(struct ocfs2_group_desc *gd)