Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Clean up struct flock64 definitions

This patch gathers all the struct flock64 definitions (and the operations),
puts them under !CONFIG_64BIT and cleans up the arch files.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Stephen Rothwell and committed by
Linus Torvalds
8d286aa5 5ac353f9

+30 -223
-12
include/asm-arm/fcntl.h
··· 6 6 #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 7 7 #define O_LARGEFILE 0400000 8 8 9 - #define F_GETLK64 12 /* using 'struct flock64' */ 10 - #define F_SETLK64 13 11 - #define F_SETLKW64 14 12 - 13 - struct flock64 { 14 - short l_type; 15 - short l_whence; 16 - loff_t l_start; 17 - loff_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 9 #include <asm-generic/fcntl.h> 22 10 23 11 #endif
-12
include/asm-arm26/fcntl.h
··· 8 8 #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 9 9 #define O_LARGEFILE 0400000 10 10 11 - #define F_GETLK64 12 /* using 'struct flock64' */ 12 - #define F_SETLK64 13 13 - #define F_SETLKW64 14 14 - 15 - struct flock64 { 16 - short l_type; 17 - short l_whence; 18 - loff_t l_start; 19 - loff_t l_len; 20 - pid_t l_pid; 21 - }; 22 - 23 11 #include <asm-generic/fcntl.h> 24 12 25 13 #endif
-17
include/asm-cris/fcntl.h
··· 1 - #ifndef _CRIS_FCNTL_H 2 - #define _CRIS_FCNTL_H 3 - 4 - #define F_GETLK64 12 /* using 'struct flock64' */ 5 - #define F_SETLK64 13 6 - #define F_SETLKW64 14 7 - 8 - struct flock64 { 9 - short l_type; 10 - short l_whence; 11 - loff_t l_start; 12 - loff_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 1 #include <asm-generic/fcntl.h> 17 - 18 - #endif
-18
include/asm-frv/fcntl.h
··· 1 - #ifndef _ASM_FCNTL_H 2 - #define _ASM_FCNTL_H 3 - 4 - #define F_GETLK64 12 /* using 'struct flock64' */ 5 - #define F_SETLK64 13 6 - #define F_SETLKW64 14 7 - 8 - struct flock64 { 9 - short l_type; 10 - short l_whence; 11 - loff_t l_start; 12 - loff_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 1 #include <asm-generic/fcntl.h> 17 - 18 - #endif /* _ASM_FCNTL_H */ 19 -
+25
include/asm-generic/fcntl.h
··· 1 1 #ifndef _ASM_GENERIC_FCNTL_H 2 2 #define _ASM_GENERIC_FCNTL_H 3 3 4 + #include <linux/config.h> 4 5 #include <linux/types.h> 5 6 6 7 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files ··· 121 120 __ARCH_FLOCK_PAD 122 121 }; 123 122 #endif 123 + 124 + #ifndef CONFIG_64BIT 125 + 126 + #ifndef F_GETLK64 127 + #define F_GETLK64 12 /* using 'struct flock64' */ 128 + #define F_SETLK64 13 129 + #define F_SETLKW64 14 130 + #endif 131 + 132 + #ifndef HAVE_ARCH_STRUCT_FLOCK64 133 + #ifndef __ARCH_FLOCK64_PAD 134 + #define __ARCH_FLOCK64_PAD 135 + #endif 136 + 137 + struct flock64 { 138 + short l_type; 139 + short l_whence; 140 + loff_t l_start; 141 + loff_t l_len; 142 + pid_t l_pid; 143 + __ARCH_FLOCK64_PAD 144 + }; 145 + #endif 146 + #endif /* !CONFIG_64BIT */ 124 147 125 148 #endif /* _ASM_GENERIC_FCNTL_H */
-12
include/asm-h8300/fcntl.h
··· 6 6 #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 7 7 #define O_LARGEFILE 0400000 8 8 9 - #define F_GETLK64 12 /* using 'struct flock64' */ 10 - #define F_SETLK64 13 11 - #define F_SETLKW64 14 12 - 13 - struct flock64 { 14 - short l_type; 15 - short l_whence; 16 - loff_t l_start; 17 - loff_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 9 #include <asm-generic/fcntl.h> 22 10 23 11 #endif /* _H8300_FCNTL_H */
-17
include/asm-i386/fcntl.h
··· 1 - #ifndef _I386_FCNTL_H 2 - #define _I386_FCNTL_H 3 - 4 - #define F_GETLK64 12 /* using 'struct flock64' */ 5 - #define F_SETLK64 13 6 - #define F_SETLKW64 14 7 - 8 - struct flock64 { 9 - short l_type; 10 - short l_whence; 11 - loff_t l_start; 12 - loff_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 1 #include <asm-generic/fcntl.h> 17 - 18 - #endif
-17
include/asm-m32r/fcntl.h
··· 1 - #ifndef _ASM_M32R_FCNTL_H 2 - #define _ASM_M32R_FCNTL_H 3 - 4 - #define F_GETLK64 12 /* using 'struct flock64' */ 5 - #define F_SETLK64 13 6 - #define F_SETLKW64 14 7 - 8 - struct flock64 { 9 - short l_type; 10 - short l_whence; 11 - loff_t l_start; 12 - loff_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 1 #include <asm-generic/fcntl.h> 17 - 18 - #endif /* _ASM_M32R_FCNTL_H */
-12
include/asm-m68k/fcntl.h
··· 6 6 #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 7 7 #define O_LARGEFILE 0400000 8 8 9 - #define F_GETLK64 12 /* using 'struct flock64' */ 10 - #define F_SETLK64 13 11 - #define F_SETLKW64 14 12 - 13 - struct flock64 { 14 - short l_type; 15 - short l_whence; 16 - loff_t l_start; 17 - loff_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 9 #include <asm-generic/fcntl.h> 22 10 23 11 #endif /* _M68K_FCNTL_H */
+3 -9
include/asm-mips/fcntl.h
··· 52 52 long pad[4]; 53 53 }; 54 54 55 - typedef struct flock64 { 56 - short l_type; 57 - short l_whence; 58 - loff_t l_start; 59 - loff_t l_len; 60 - pid_t l_pid; 61 - } flock64_t; 62 - 63 - 64 55 #define HAVE_ARCH_STRUCT_FLOCK 65 56 66 57 #endif ··· 59 68 #include <asm-generic/fcntl.h> 60 69 61 70 typedef struct flock flock_t; 71 + #ifndef __mips64 72 + typedef struct flock64 flock64_t; 73 + #endif 62 74 63 75 #endif /* _ASM_FCNTL_H */
-8
include/asm-parisc/fcntl.h
··· 33 33 #define F_WRLCK 02 34 34 #define F_UNLCK 03 35 35 36 - struct flock64 { 37 - short l_type; 38 - short l_whence; 39 - loff_t l_start; 40 - loff_t l_len; 41 - pid_t l_pid; 42 - }; 43 - 44 36 #include <asm-generic/fcntl.h> 45 37 46 38 #endif
-14
include/asm-ppc/fcntl.h
··· 6 6 #define O_LARGEFILE 0200000 7 7 #define O_DIRECT 0400000 /* direct disk access hint */ 8 8 9 - #ifndef __powerpc64__ 10 - #define F_GETLK64 12 /* using 'struct flock64' */ 11 - #define F_SETLK64 13 12 - #define F_SETLKW64 14 13 - 14 - struct flock64 { 15 - short l_type; 16 - short l_whence; 17 - loff_t l_start; 18 - loff_t l_len; 19 - pid_t l_pid; 20 - }; 21 - #endif 22 - 23 9 #include <asm-generic/fcntl.h> 24 10 25 11 #endif /* _PPC_FCNTL_H */
-26
include/asm-s390/fcntl.h
··· 1 - /* 2 - * include/asm-s390/fcntl.h 3 - * 4 - * S390 version 5 - * 6 - * Derived from "include/asm-i386/fcntl.h" 7 - */ 8 - #ifndef _S390_FCNTL_H 9 - #define _S390_FCNTL_H 10 - 11 - #ifndef __s390x__ 12 - #define F_GETLK64 12 /* using 'struct flock64' */ 13 - #define F_SETLK64 13 14 - #define F_SETLKW64 14 15 - 16 - struct flock64 { 17 - short l_type; 18 - short l_whence; 19 - loff_t l_start; 20 - loff_t l_len; 21 - pid_t l_pid; 22 - }; 23 - #endif 24 - 25 1 #include <asm-generic/fcntl.h> 26 - 27 - #endif
-18
include/asm-sh/fcntl.h
··· 1 - #ifndef __ASM_SH_FCNTL_H 2 - #define __ASM_SH_FCNTL_H 3 - 4 - #define F_GETLK64 12 /* using 'struct flock64' */ 5 - #define F_SETLK64 13 6 - #define F_SETLKW64 14 7 - 8 - struct flock64 { 9 - short l_type; 10 - short l_whence; 11 - loff_t l_start; 12 - loff_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 1 #include <asm-generic/fcntl.h> 17 - 18 - #endif /* __ASM_SH_FCNTL_H */ 19 -
-6
include/asm-sh64/fcntl.h
··· 1 - #ifndef __ASM_SH64_FCNTL_H 2 - #define __ASM_SH64_FCNTL_H 3 - 4 1 #include <asm-sh/fcntl.h> 5 - 6 - #endif /* __ASM_SH64_FCNTL_H */ 7 -
+1 -13
include/asm-sparc/fcntl.h
··· 23 23 #define F_SETLK 8 24 24 #define F_SETLKW 9 25 25 26 - #define F_GETLK64 12 /* using 'struct flock64' */ 27 - #define F_SETLK64 13 28 - #define F_SETLKW64 14 29 - 30 26 /* for posix fcntl() and lockf() */ 31 27 #define F_RDLCK 1 32 28 #define F_WRLCK 2 33 29 #define F_UNLCK 3 34 30 35 - struct flock64 { 36 - short l_type; 37 - short l_whence; 38 - loff_t l_start; 39 - loff_t l_len; 40 - pid_t l_pid; 41 - short __unused; 42 - }; 43 - 44 31 #define __ARCH_FLOCK_PAD short __unused; 32 + #define __ARCH_FLOCK64_PAD short __unused; 45 33 46 34 #include <asm-generic/fcntl.h> 47 35
-12
include/asm-v850/fcntl.h
··· 6 6 #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 7 7 #define O_LARGEFILE 0400000 8 8 9 - #define F_GETLK64 12 /* using 'struct flock64' */ 10 - #define F_SETLK64 13 11 - #define F_SETLKW64 14 12 - 13 - struct flock64 { 14 - short l_type; 15 - short l_whence; 16 - loff_t l_start; 17 - loff_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 9 #include <asm-generic/fcntl.h> 22 10 23 11 #endif /* __V850_FCNTL_H__ */
+1
include/asm-xtensa/fcntl.h
··· 54 54 }; 55 55 56 56 #define HAVE_ARCH_STRUCT_FLOCK 57 + #define HAVE_ARCH_STRUCT_FLOCK64 57 58 58 59 #include <asm-generic/fcntl.h> 59 60