]> git.hungrycats.org Git - linux/commitdiff
[PATCH] statfs64 fix
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Dec 2003 13:49:29 +0000 (05:49 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Dec 2003 13:49:29 +0000 (05:49 -0800)
From: Andi Kleen <ak@muc.de>

It fixes the statfs64 emulation on x86-64.  The problem is that x86-64
needs an __attribute__((aligned)) on the compat_statfs64 structure.  The
conclusion last time this was discussed was that the structure should be
duplicated.

Essentially it is the old shared structure copied to every user and x86-64
uses __attribute__((packed)).

include/asm-generic/statfs.h
include/asm-ia64/statfs.h
include/asm-mips/statfs.h
include/asm-parisc/statfs.h
include/asm-ppc64/statfs.h
include/asm-s390/statfs.h
include/asm-sparc64/statfs.h
include/asm-x86_64/statfs.h
include/linux/compat.h

index fecaf8fd5c10d80db4d41f2c1f9212be07458e13..1d01043e797d94180f79ef026e5abafedc94bb1b 100644 (file)
@@ -34,4 +34,18 @@ struct statfs64 {
        __u32 f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif
index 053effc79ac93f048d8a52e32d8a07c556bec13b..f4fa9462842f89dd26c005ad51fefcb97bed627f 100644 (file)
@@ -43,5 +43,18 @@ struct statfs64 {
        long f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+} __attribute__((packed));
 
 #endif /* _ASM_IA64_STATFS_H */
index 58a8999eef316d5ff1fd6370214ebbf5fbd2036e..ef15465abdf99251ad68d0a3c7144cca4ead4701 100644 (file)
@@ -75,6 +75,20 @@ struct statfs64 {                    /* Same as struct statfs */
        long            f_spare[6];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #endif /* _ASM_STATFS_H */
index e8c8169d5d7fa2f401786913830cf4a5460761cb..a52d8f93f05cef647096cc445940a3b5b356f73b 100644 (file)
@@ -41,4 +41,18 @@ struct statfs64 {
        long f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif
index 7cce64bf7ee0e34a67ccf5ea1df12bfc9034cbe1..3c985e5246a7bf893aa99b41448036b3ecf1f4ac 100644 (file)
@@ -44,4 +44,18 @@ struct statfs64 {
        long f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif  /* _PPC64_STATFS_H */
index f9edb541f99fbf7537a476a933c006c66bda83c4..099a45579190e4764343dfebe85cc05f178293f9 100644 (file)
@@ -53,5 +53,19 @@ struct statfs64 {
        int  f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif /* __s390x__ */
 #endif
index 5985f1901cfc87ed28dc310c0259ed407c1bf5f1..185b6c481b24fb2af549c412bd49a7176edcbc75 100644 (file)
@@ -38,4 +38,18 @@ struct statfs64 {
        long f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+};
+
 #endif
index bb11240c22b8ba30f4ad1791995841f8d5b5e874..b3f4718af30b09a1fc0c28638ebd17d30fbb152a 100644 (file)
@@ -41,4 +41,18 @@ struct statfs64 {
        long f_spare[5];
 };
 
+struct compat_statfs64 {
+       __u32 f_type;
+       __u32 f_bsize;
+       __u64 f_blocks;
+       __u64 f_bfree;
+       __u64 f_bavail;
+       __u64 f_files;
+       __u64 f_ffree;
+       __kernel_fsid_t f_fsid;
+       __u32 f_namelen;
+       __u32 f_frsize;
+       __u32 f_spare[5];
+} __attribute__((packed));
+
 #endif
index 3e8e53bdd42e49a71eb151dc257e76b2f8cd5b94..d9adcd5b77c05b3b988802a53c567ff85f1bc5af 100644 (file)
@@ -76,20 +76,6 @@ struct compat_rusage {
        compat_long_t   ru_nivcsw;
 };
 
-struct compat_statfs64 {
-       __u32 f_type;
-       __u32 f_bsize;
-       __u64 f_blocks;
-       __u64 f_bfree;
-       __u64 f_bavail;
-       __u64 f_files;
-       __u64 f_ffree;
-       __kernel_fsid_t f_fsid;
-       __u32 f_namelen;
-       __u32 f_frsize;
-       __u32 f_spare[5];
-};
-
 struct compat_dirent {
        u32             d_ino;
        compat_off_t    d_off;