aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr_leaf.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.h')
-rw-r--r--fs/xfs/xfs_attr_leaf.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h
index 83e9af417ca2..9c7d22fdcf4d 100644
--- a/fs/xfs/xfs_attr_leaf.h
+++ b/fs/xfs/xfs_attr_leaf.h
@@ -151,8 +151,6 @@ typedef struct xfs_attr_leafblock {
151/* 151/*
152 * Cast typed pointers for "local" and "remote" name/value structs. 152 * Cast typed pointers for "local" and "remote" name/value structs.
153 */ 153 */
154#define XFS_ATTR_LEAF_NAME_REMOTE(leafp,idx) \
155 xfs_attr_leaf_name_remote(leafp,idx)
156static inline xfs_attr_leaf_name_remote_t * 154static inline xfs_attr_leaf_name_remote_t *
157xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx) 155xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx)
158{ 156{
@@ -160,8 +158,6 @@ xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx)
160 &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; 158 &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)];
161} 159}
162 160
163#define XFS_ATTR_LEAF_NAME_LOCAL(leafp,idx) \
164 xfs_attr_leaf_name_local(leafp,idx)
165static inline xfs_attr_leaf_name_local_t * 161static inline xfs_attr_leaf_name_local_t *
166xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx) 162xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx)
167{ 163{
@@ -169,8 +165,6 @@ xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx)
169 &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; 165 &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)];
170} 166}
171 167
172#define XFS_ATTR_LEAF_NAME(leafp,idx) \
173 xfs_attr_leaf_name(leafp,idx)
174static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx) 168static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx)
175{ 169{
176 return &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; 170 return &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)];
@@ -181,24 +175,18 @@ static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx)
181 * a "local" name/value structure, a "remote" name/value structure, and 175 * a "local" name/value structure, a "remote" name/value structure, and
182 * a pointer which might be either. 176 * a pointer which might be either.
183 */ 177 */
184#define XFS_ATTR_LEAF_ENTSIZE_REMOTE(nlen) \
185 xfs_attr_leaf_entsize_remote(nlen)
186static inline int xfs_attr_leaf_entsize_remote(int nlen) 178static inline int xfs_attr_leaf_entsize_remote(int nlen)
187{ 179{
188 return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \ 180 return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \
189 XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); 181 XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1);
190} 182}
191 183
192#define XFS_ATTR_LEAF_ENTSIZE_LOCAL(nlen,vlen) \
193 xfs_attr_leaf_entsize_local(nlen,vlen)
194static inline int xfs_attr_leaf_entsize_local(int nlen, int vlen) 184static inline int xfs_attr_leaf_entsize_local(int nlen, int vlen)
195{ 185{
196 return ((uint)sizeof(xfs_attr_leaf_name_local_t) - 1 + (nlen) + (vlen) + 186 return ((uint)sizeof(xfs_attr_leaf_name_local_t) - 1 + (nlen) + (vlen) +
197 XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); 187 XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1);
198} 188}
199 189
200#define XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX(bsize) \
201 xfs_attr_leaf_entsize_local_max(bsize)
202static inline int xfs_attr_leaf_entsize_local_max(int bsize) 190static inline int xfs_attr_leaf_entsize_local_max(int bsize)
203{ 191{
204 return (((bsize) >> 1) + ((bsize) >> 2)); 192 return (((bsize) >> 1) + ((bsize) >> 2));