mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
uapi: simplify __ARCH_FLOCK{,64}_PAD a little
Don't bother to define the symbols empty, just don't use them. That makes the intent a little more clear. Remove the unused HAVE_ARCH_STRUCT_FLOCK64 define and merge the 32-bit mips struct flock into the generic one. Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of __ARCH_FLOCK_PAD to avoid having a separate definition just for one architecture. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
This commit is contained in:
1 parent
3123109284
commit
9f79b8b723
3 files changed
+17
-47
No files matched your search
@@ -50,30 +50,10 @@
|
||||
#define F_SETLKW64 35
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The flavours of struct flock. "struct flock" is the ABI compliant
|
||||
* variant. Finally struct flock64 is the LFS variant of struct flock. As
|
||||
* a historic accident and inconsistence with the ABI definition it doesn't
|
||||
* contain all the same fields as struct flock.
|
||||
*/
|
||||
|
||||
#if _MIPS_SIM != _MIPS_SIM_ABI64
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_off_t l_start;
|
||||
__kernel_off_t l_len;
|
||||
long l_sysid;
|
||||
__kernel_pid_t l_pid;
|
||||
long pad[4];
|
||||
};
|
||||
|
||||
#define HAVE_ARCH_STRUCT_FLOCK
|
||||
|
||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
|
||||
#define __ARCH_FLOCK_EXTRA_SYSID long l_sysid;
|
||||
#define __ARCH_FLOCK_PAD long pad[4];
|
||||
#endif
|
||||
|
||||
#include <asm-generic/fcntl.h>
|
||||
|
||||
|
||||
@@ -192,25 +192,19 @@ struct f_owner_ex {
|
||||
|
||||
#define F_LINUX_SPECIFIC_BASE 1024
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
||||
#ifndef __ARCH_FLOCK_PAD
|
||||
#define __ARCH_FLOCK_PAD
|
||||
#endif
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_off_t l_start;
|
||||
__kernel_off_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK_EXTRA_SYSID
|
||||
__ARCH_FLOCK_EXTRA_SYSID
|
||||
#endif
|
||||
#ifdef __ARCH_FLOCK_PAD
|
||||
__ARCH_FLOCK_PAD
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
||||
#ifndef __ARCH_FLOCK64_PAD
|
||||
#define __ARCH_FLOCK64_PAD
|
||||
#endif
|
||||
|
||||
struct flock64 {
|
||||
short l_type;
|
||||
@@ -218,8 +212,9 @@ struct flock64 {
|
||||
__kernel_loff_t l_start;
|
||||
__kernel_loff_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK64_PAD
|
||||
__ARCH_FLOCK64_PAD
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* _ASM_GENERIC_FCNTL_H */
|
||||
@@ -187,25 +187,19 @@ struct f_owner_ex {
|
||||
|
||||
#define F_LINUX_SPECIFIC_BASE 1024
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
||||
#ifndef __ARCH_FLOCK_PAD
|
||||
#define __ARCH_FLOCK_PAD
|
||||
#endif
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_off_t l_start;
|
||||
__kernel_off_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK_EXTRA_SYSID
|
||||
__ARCH_FLOCK_EXTRA_SYSID
|
||||
#endif
|
||||
#ifdef __ARCH_FLOCK_PAD
|
||||
__ARCH_FLOCK_PAD
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
||||
#ifndef __ARCH_FLOCK64_PAD
|
||||
#define __ARCH_FLOCK64_PAD
|
||||
#endif
|
||||
|
||||
struct flock64 {
|
||||
short l_type;
|
||||
@@ -213,8 +207,9 @@ struct flock64 {
|
||||
__kernel_loff_t l_start;
|
||||
__kernel_loff_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK64_PAD
|
||||
__ARCH_FLOCK64_PAD
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* _ASM_GENERIC_FCNTL_H */
|
||||
Reference in new issue
Block a user