f2fs: use generic names for generic ioctls
Eric Biggers
maintainerPATCH 1/1 f2fs: use generic names for generic ioctls
From: Eric Biggers <[email protected]>
Don't define F2FS_IOC_* aliases to ioctls that already have a generic FS_IOC_* name. These aliases are unnecessary, and they make it unclear which ioctls are f2fs-specific and which are generic.
Signed-off-by Eric Biggers <[email protected]>
--- fs/f2fs/f2fs.h | 25 +---------------------- fs/f2fs/file.c | 54 +++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 51 deletions(-)
fs/f2fs/f2fs.h +1 -24
@@ -402,12 +402,8 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal, }/* -* ioctl commands +* f2fs-specific ioctl commands */ -#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS -#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS -#define F2FS_IOC_GETVERSION FS_IOC_GETVERSION -#define F2FS_IOCTL_MAGIC 0xf5#define F2FS_IOC_START_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 1)#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)
@@ -437,13 +433,6 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal,#define F2FS_IOC_SEC_TRIM_FILE _IOW(F2FS_IOCTL_MAGIC, 20, \ struct f2fs_sectrim_range) -#define F2FS_IOC_GET_VOLUME_NAME FS_IOC_GETFSLABEL -#define F2FS_IOC_SET_VOLUME_NAME FS_IOC_SETFSLABEL - -#define F2FS_IOC_SET_ENCRYPTION_POLICY FS_IOC_SET_ENCRYPTION_POLICY -#define F2FS_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY -#define F2FS_IOC_GET_ENCRYPTION_PWSALT FS_IOC_GET_ENCRYPTION_PWSALT -/* * should be same as XFS_IOC_GOINGDOWN. * Flags for going down operation used by FS_IOC_GOINGDOWN
@@ -462,18 +451,6 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal,#define F2FS_TRIM_FILE_ZEROOUT 0x2/* zero out */ #define F2FS_TRIM_FILE_MASK 0x3 -#if defined(__KERNEL__) && defined(CONFIG_COMPAT ) -/* -* ioctl commands in 32 bit emulation -*/ -#define F2FS_IOC32_GETFLAGS FS_IOC32_GETFLAGS -#define F2FS_IOC32_SETFLAGS FS_IOC32_SETFLAGS -#define F2FS_IOC32_GETVERSION FS_IOC32_GETVERSION -#endif - -#define F2FS_IOC_FSGETXATTR FS_IOC_FSGETXATTR -#define F2FS_IOC_FSSETXATTR FS_IOC_FSSETXATTR -struct f2fs_gc_range {u32 sync;u64 start;
fs/f2fs/file.c +27 -27
121 lines not on this page · raw message
Signature · 1 line
2.27.0
Quoted 7 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Don't define F2FS_IOC_* aliases to ioctls that already have a generic FS_IOC_* name. These aliases are unnecessary, and they make it unclear which ioctls are f2fs-specific and which are generic.
Signed-off-by Eric Biggers <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,