arm64: Fix compat types affecting struct compat_stat
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 25 Apr 2013 10:23:41 +0000 (11:23 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 25 Apr 2013 16:45:50 +0000 (17:45 +0100)
The compat_stat structure doesn't match the arch/arm/ struct stat
definition. This patch fixes the compat types and struct compat_stat
definition accordingly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/compat.h

index 618b450e5a1d5e009f30784b11e66a3fbc6468c5..899af807ef0ff3d789491d6e0ee8d9684886f849 100644 (file)
@@ -35,14 +35,16 @@ typedef s32         compat_clock_t;
 typedef s32            compat_pid_t;
 typedef u32            __compat_uid_t;
 typedef u32            __compat_gid_t;
+typedef u16            __compat_uid16_t;
+typedef u16            __compat_gid16_t;
 typedef u32            __compat_uid32_t;
 typedef u32            __compat_gid32_t;
-typedef u32            compat_mode_t;
+typedef u16            compat_mode_t;
 typedef u32            compat_ino_t;
 typedef u32            compat_dev_t;
 typedef s32            compat_off_t;
 typedef s64            compat_loff_t;
-typedef s16            compat_nlink_t;
+typedef s32            compat_nlink_t;
 typedef u16            compat_ipc_pid_t;
 typedef s32            compat_daddr_t;
 typedef u32            compat_caddr_t;
@@ -50,9 +52,11 @@ typedef __kernel_fsid_t      compat_fsid_t;
 typedef s32            compat_key_t;
 typedef s32            compat_timer_t;
 
+typedef s16            compat_short_t;
 typedef s32            compat_int_t;
 typedef s32            compat_long_t;
 typedef s64            compat_s64;
+typedef u16            compat_ushort_t;
 typedef u32            compat_uint_t;
 typedef u32            compat_ulong_t;
 typedef u64            compat_u64;
@@ -72,20 +76,20 @@ struct compat_stat {
        compat_dev_t    st_dev;
        compat_ino_t    st_ino;
        compat_mode_t   st_mode;
-       compat_nlink_t  st_nlink;
-       __compat_uid32_t        st_uid;
-       __compat_gid32_t        st_gid;
+       compat_ushort_t st_nlink;
+       __compat_uid16_t        st_uid;
+       __compat_gid16_t        st_gid;
        compat_dev_t    st_rdev;
        compat_off_t    st_size;
        compat_off_t    st_blksize;
        compat_off_t    st_blocks;
        compat_time_t   st_atime;
-       u32             st_atime_nsec;
+       compat_ulong_t  st_atime_nsec;
        compat_time_t   st_mtime;
-       u32             st_mtime_nsec;
+       compat_ulong_t  st_mtime_nsec;
        compat_time_t   st_ctime;
-       u32             st_ctime_nsec;
-       u32             __unused4[2];
+       compat_ulong_t  st_ctime_nsec;
+       compat_ulong_t  __unused4[2];
 };
 
 struct compat_flock {