diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-08-12 06:49:54 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-12 18:04:08 -0400 |
commit | 4f3d71f68bc976321b19efe2624cd91619af601f (patch) | |
tree | 177701e32b849b2ae80e0eac127f8d7bbef3a947 /fs/xfs | |
parent | 9b90b0d9da907a1810e7b7764befaf084e4cd45b (diff) |
xfs: move kernel specific type definitions to xfs.h
xfs_types.h is shared with userspace, so having kernel specific
types defined in it is problematic. Move all the kernel specific
defines to xfs_linux.h so we can remove the __KERNEL__ guards from
xfs_types.h.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_linux.h | 32 | ||||
-rw-r--r-- | fs/xfs/xfs_types.h | 36 |
2 files changed, 32 insertions, 36 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index 800f896a6cc4..3bc52b78f8b7 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h | |||
@@ -32,6 +32,38 @@ | |||
32 | # define XFS_BIG_INUMS 0 | 32 | # define XFS_BIG_INUMS 0 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | /* | ||
36 | * Kernel specific type declarations for XFS | ||
37 | */ | ||
38 | typedef signed char __int8_t; | ||
39 | typedef unsigned char __uint8_t; | ||
40 | typedef signed short int __int16_t; | ||
41 | typedef unsigned short int __uint16_t; | ||
42 | typedef signed int __int32_t; | ||
43 | typedef unsigned int __uint32_t; | ||
44 | typedef signed long long int __int64_t; | ||
45 | typedef unsigned long long int __uint64_t; | ||
46 | |||
47 | typedef __uint32_t inst_t; /* an instruction */ | ||
48 | |||
49 | typedef __s64 xfs_off_t; /* <file offset> type */ | ||
50 | typedef unsigned long long xfs_ino_t; /* <inode> type */ | ||
51 | typedef __s64 xfs_daddr_t; /* <disk address> type */ | ||
52 | typedef char * xfs_caddr_t; /* <core address> type */ | ||
53 | typedef __u32 xfs_dev_t; | ||
54 | typedef __u32 xfs_nlink_t; | ||
55 | |||
56 | /* __psint_t is the same size as a pointer */ | ||
57 | #if (BITS_PER_LONG == 32) | ||
58 | typedef __int32_t __psint_t; | ||
59 | typedef __uint32_t __psunsigned_t; | ||
60 | #elif (BITS_PER_LONG == 64) | ||
61 | typedef __int64_t __psint_t; | ||
62 | typedef __uint64_t __psunsigned_t; | ||
63 | #else | ||
64 | #error BITS_PER_LONG must be 32 or 64 | ||
65 | #endif | ||
66 | |||
35 | #include "xfs_types.h" | 67 | #include "xfs_types.h" |
36 | 68 | ||
37 | #include "kmem.h" | 69 | #include "kmem.h" |
diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h index 6ed6b26585c2..ce44b182821f 100644 --- a/fs/xfs/xfs_types.h +++ b/fs/xfs/xfs_types.h | |||
@@ -18,42 +18,6 @@ | |||
18 | #ifndef __XFS_TYPES_H__ | 18 | #ifndef __XFS_TYPES_H__ |
19 | #define __XFS_TYPES_H__ | 19 | #define __XFS_TYPES_H__ |
20 | 20 | ||
21 | #ifdef __KERNEL__ | ||
22 | |||
23 | /* | ||
24 | * Additional type declarations for XFS | ||
25 | */ | ||
26 | typedef signed char __int8_t; | ||
27 | typedef unsigned char __uint8_t; | ||
28 | typedef signed short int __int16_t; | ||
29 | typedef unsigned short int __uint16_t; | ||
30 | typedef signed int __int32_t; | ||
31 | typedef unsigned int __uint32_t; | ||
32 | typedef signed long long int __int64_t; | ||
33 | typedef unsigned long long int __uint64_t; | ||
34 | |||
35 | typedef __uint32_t inst_t; /* an instruction */ | ||
36 | |||
37 | typedef __s64 xfs_off_t; /* <file offset> type */ | ||
38 | typedef unsigned long long xfs_ino_t; /* <inode> type */ | ||
39 | typedef __s64 xfs_daddr_t; /* <disk address> type */ | ||
40 | typedef char * xfs_caddr_t; /* <core address> type */ | ||
41 | typedef __u32 xfs_dev_t; | ||
42 | typedef __u32 xfs_nlink_t; | ||
43 | |||
44 | /* __psint_t is the same size as a pointer */ | ||
45 | #if (BITS_PER_LONG == 32) | ||
46 | typedef __int32_t __psint_t; | ||
47 | typedef __uint32_t __psunsigned_t; | ||
48 | #elif (BITS_PER_LONG == 64) | ||
49 | typedef __int64_t __psint_t; | ||
50 | typedef __uint64_t __psunsigned_t; | ||
51 | #else | ||
52 | #error BITS_PER_LONG must be 32 or 64 | ||
53 | #endif | ||
54 | |||
55 | #endif /* __KERNEL__ */ | ||
56 | |||
57 | typedef __uint32_t prid_t; /* project ID */ | 21 | typedef __uint32_t prid_t; /* project ID */ |
58 | 22 | ||
59 | typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ | 23 | typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ |