diff options
Diffstat (limited to 'fs/xfs/xfs_dir_leaf.h')
-rw-r--r-- | fs/xfs/xfs_dir_leaf.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h index 480bffc1f29f..216d62693b72 100644 --- a/fs/xfs/xfs_dir_leaf.h +++ b/fs/xfs/xfs_dir_leaf.h | |||
@@ -152,30 +152,26 @@ typedef struct xfs_dir_put_args | |||
152 | struct uio *uio; /* uio control structure */ | 152 | struct uio *uio; /* uio control structure */ |
153 | } xfs_dir_put_args_t; | 153 | } xfs_dir_put_args_t; |
154 | 154 | ||
155 | #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYNAME) | ||
156 | int xfs_dir_leaf_entsize_byname(int len); | ||
157 | #define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) xfs_dir_leaf_entsize_byname(len) | 155 | #define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) xfs_dir_leaf_entsize_byname(len) |
158 | #else | 156 | static inline int xfs_dir_leaf_entsize_byname(int len) |
159 | #define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) /* space a name will use */ \ | 157 | { |
160 | ((uint)sizeof(xfs_dir_leaf_name_t)-1 + len) | 158 | return (uint)sizeof(xfs_dir_leaf_name_t)-1 + len; |
161 | #endif | 159 | } |
162 | #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYENTRY) | 160 | |
163 | int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry); | ||
164 | #define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \ | 161 | #define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \ |
165 | xfs_dir_leaf_entsize_byentry(entry) | 162 | xfs_dir_leaf_entsize_byentry(entry) |
166 | #else | 163 | static inline int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry) |
167 | #define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) /* space an entry will use */ \ | 164 | { |
168 | ((uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen) | 165 | return (uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen; |
169 | #endif | 166 | } |
170 | #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_NAMESTRUCT) | 167 | |
171 | xfs_dir_leaf_name_t * | ||
172 | xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset); | ||
173 | #define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \ | 168 | #define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \ |
174 | xfs_dir_leaf_namestruct(leafp,offset) | 169 | xfs_dir_leaf_namestruct(leafp,offset) |
175 | #else | 170 | static inline xfs_dir_leaf_name_t * |
176 | #define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) /* point to name struct */ \ | 171 | xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset) |
177 | ((xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]) | 172 | { |
178 | #endif | 173 | return (xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]; |
174 | } | ||
179 | 175 | ||
180 | /*======================================================================== | 176 | /*======================================================================== |
181 | * Function prototypes for the kernel. | 177 | * Function prototypes for the kernel. |
@@ -190,7 +186,7 @@ int xfs_dir_shortform_lookup(struct xfs_da_args *args); | |||
190 | int xfs_dir_shortform_to_leaf(struct xfs_da_args *args); | 186 | int xfs_dir_shortform_to_leaf(struct xfs_da_args *args); |
191 | int xfs_dir_shortform_removename(struct xfs_da_args *args); | 187 | int xfs_dir_shortform_removename(struct xfs_da_args *args); |
192 | int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, | 188 | int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, |
193 | struct xfs_dirent *dbp, xfs_dir_put_t put); | 189 | struct xfs_dirent *dbp, xfs_dir_put_t put); |
194 | int xfs_dir_shortform_replace(struct xfs_da_args *args); | 190 | int xfs_dir_shortform_replace(struct xfs_da_args *args); |
195 | 191 | ||
196 | /* | 192 | /* |
@@ -237,7 +233,6 @@ int xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa); | |||
237 | int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa); | 233 | int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa); |
238 | int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); | 234 | int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); |
239 | 235 | ||
240 | |||
241 | /* | 236 | /* |
242 | * Global data. | 237 | * Global data. |
243 | */ | 238 | */ |