From 837a6e7f5cdb5e411c6187729e12962c2705160d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 24 Oct 2019 22:26:02 -0700 Subject: fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers These use the same scheme as the pre-existing mapping of the XFS RESVP ioctls to ->falloc, so just extend it and remove the XFS implementation. Signed-off-by: Christoph Hellwig [darrick: fix compile error on s390] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- include/linux/falloc.h | 3 +++ include/linux/fs.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/falloc.h b/include/linux/falloc.h index 674d59f4d6ce..f5c73f0ec22d 100644 --- a/include/linux/falloc.h +++ b/include/linux/falloc.h @@ -20,7 +20,10 @@ struct space_resv { }; #define FS_IOC_RESVSP _IOW('X', 40, struct space_resv) +#define FS_IOC_UNRESVSP _IOW('X', 41, struct space_resv) #define FS_IOC_RESVSP64 _IOW('X', 42, struct space_resv) +#define FS_IOC_UNRESVSP64 _IOW('X', 43, struct space_resv) +#define FS_IOC_ZERO_RANGE _IOW('X', 57, struct space_resv) #define FALLOC_FL_SUPPORTED_MASK (FALLOC_FL_KEEP_SIZE | \ FALLOC_FL_PUNCH_HOLE | \ diff --git a/include/linux/fs.h b/include/linux/fs.h index e0d909d35763..2b5692207c1d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2547,7 +2547,7 @@ extern int finish_no_open(struct file *file, struct dentry *dentry); /* fs/ioctl.c */ -extern int ioctl_preallocate(struct file *filp, void __user *argp); +extern int ioctl_preallocate(struct file *filp, int mode, void __user *argp); /* fs/dcache.c */ extern void __init vfs_caches_init_early(void); -- cgit v1.2.3