diff options
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 0db01421da3e..d5193b55ca94 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -855,24 +855,6 @@ struct ext4_dir_entry_2 { | |||
855 | ~EXT4_DIR_ROUND) | 855 | ~EXT4_DIR_ROUND) |
856 | #define EXT4_MAX_REC_LEN ((1<<16)-1) | 856 | #define EXT4_MAX_REC_LEN ((1<<16)-1) |
857 | 857 | ||
858 | static inline unsigned ext4_rec_len_from_disk(__le16 dlen) | ||
859 | { | ||
860 | unsigned len = le16_to_cpu(dlen); | ||
861 | |||
862 | if (len == EXT4_MAX_REC_LEN || len == 0) | ||
863 | return 1 << 16; | ||
864 | return len; | ||
865 | } | ||
866 | |||
867 | static inline __le16 ext4_rec_len_to_disk(unsigned len) | ||
868 | { | ||
869 | if (len == (1 << 16)) | ||
870 | return cpu_to_le16(EXT4_MAX_REC_LEN); | ||
871 | else if (len > (1 << 16)) | ||
872 | BUG(); | ||
873 | return cpu_to_le16(len); | ||
874 | } | ||
875 | |||
876 | /* | 858 | /* |
877 | * Hash Tree Directory indexing | 859 | * Hash Tree Directory indexing |
878 | * (c) Daniel Phillips, 2001 | 860 | * (c) Daniel Phillips, 2001 |
@@ -1097,7 +1079,10 @@ extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long); | |||
1097 | 1079 | ||
1098 | /* migrate.c */ | 1080 | /* migrate.c */ |
1099 | extern int ext4_ext_migrate(struct inode *); | 1081 | extern int ext4_ext_migrate(struct inode *); |
1082 | |||
1100 | /* namei.c */ | 1083 | /* namei.c */ |
1084 | extern unsigned int ext4_rec_len_from_disk(__le16 dlen, unsigned blocksize); | ||
1085 | extern __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize); | ||
1101 | extern int ext4_orphan_add(handle_t *, struct inode *); | 1086 | extern int ext4_orphan_add(handle_t *, struct inode *); |
1102 | extern int ext4_orphan_del(handle_t *, struct inode *); | 1087 | extern int ext4_orphan_del(handle_t *, struct inode *); |
1103 | extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash, | 1088 | extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash, |