aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_arch.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@sgi.com>2005-11-01 23:01:12 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 23:01:12 -0500
commit1149d96ae825a1e1e9d66774175372c003f29caf (patch)
treebfc8b5c03a39283228922e711fd2675bd281db50 /fs/xfs/xfs_arch.h
parentfa7e7d71e05f12921fefdc23386183578d3ed8c7 (diff)
[XFS] endianess annotations and cleanup for the quota code
SGI-PV: 943272 SGI-Modid: xfs-linux:xfs-kern:199767a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_arch.h')
-rw-r--r--fs/xfs/xfs_arch.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h
index 3191dc60d8db..68e5051d8e24 100644
--- a/fs/xfs/xfs_arch.h
+++ b/fs/xfs/xfs_arch.h
@@ -154,6 +154,21 @@
154 } \ 154 } \
155} 155}
156 156
157static inline void be16_add(__be16 *a, __s16 b)
158{
159 *a = cpu_to_be16(be16_to_cpu(*a) + b);
160}
161
162static inline void be32_add(__be32 *a, __s32 b)
163{
164 *a = cpu_to_be32(be32_to_cpu(*a) + b);
165}
166
167static inline void be64_add(__be64 *a, __s64 b)
168{
169 *a = cpu_to_be64(be64_to_cpu(*a) + b);
170}
171
157/* 172/*
158 * In directories inode numbers are stored as unaligned arrays of unsigned 173 * In directories inode numbers are stored as unaligned arrays of unsigned
159 * 8bit integers on disk. 174 * 8bit integers on disk.