Re: [PATCH 1/4] xfs: don't implement XFS_IOC_RESVSP / XFS_IOC_RESVSP64 directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25, 2019 at 11:36:06AM +0900, Christoph Hellwig wrote:
> These ioctls are implemented by the VFS and mapped to ->fallocate now,
> so this code won't ever be reached.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_ioctl.c   | 10 ----------
>  fs/xfs/xfs_ioctl32.c |  2 --
>  2 files changed, 12 deletions(-)
> 
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 0fed56d3175c..da4aaa75cfd3 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -643,8 +643,6 @@ xfs_ioc_space(
>  	 */
>  	switch (cmd) {
>  	case XFS_IOC_ZERO_RANGE:
> -	case XFS_IOC_RESVSP:
> -	case XFS_IOC_RESVSP64:
>  	case XFS_IOC_UNRESVSP:
>  	case XFS_IOC_UNRESVSP64:
>  		if (bf->l_len <= 0) {
> @@ -670,12 +668,6 @@ xfs_ioc_space(
>  		flags |= XFS_PREALLOC_SET;
>  		error = xfs_zero_file_space(ip, bf->l_start, bf->l_len);
>  		break;
> -	case XFS_IOC_RESVSP:
> -	case XFS_IOC_RESVSP64:
> -		flags |= XFS_PREALLOC_SET;
> -		error = xfs_alloc_file_space(ip, bf->l_start, bf->l_len,
> -						XFS_BMAPI_PREALLOC);
> -		break;
>  	case XFS_IOC_UNRESVSP:
>  	case XFS_IOC_UNRESVSP64:
>  		error = xfs_free_file_space(ip, bf->l_start, bf->l_len);
> @@ -2121,11 +2113,9 @@ xfs_file_ioctl(
>  		return xfs_ioc_setlabel(filp, mp, arg);
>  	case XFS_IOC_ALLOCSP:
>  	case XFS_IOC_FREESP:
> -	case XFS_IOC_RESVSP:
>  	case XFS_IOC_UNRESVSP:
>  	case XFS_IOC_ALLOCSP64:
>  	case XFS_IOC_FREESP64:
> -	case XFS_IOC_RESVSP64:
>  	case XFS_IOC_UNRESVSP64:
>  	case XFS_IOC_ZERO_RANGE: {
>  		xfs_flock64_t		bf;
> diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
> index 1e08bf79b478..257b7caf7fed 100644
> --- a/fs/xfs/xfs_ioctl32.c
> +++ b/fs/xfs/xfs_ioctl32.c
> @@ -558,8 +558,6 @@ xfs_file_compat_ioctl(
>  	case XFS_IOC_FREESP_32:
>  	case XFS_IOC_ALLOCSP64_32:
>  	case XFS_IOC_FREESP64_32:
> -	case XFS_IOC_RESVSP_32:
> -	case XFS_IOC_UNRESVSP_32:
>  	case XFS_IOC_RESVSP64_32:
>  	case XFS_IOC_UNRESVSP64_32:
>  	case XFS_IOC_ZERO_RANGE_32: {
> -- 
> 2.20.1
> 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux