Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9abea2d6 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds
Browse files

ioctl_compat: handle FITRIM



The FITRIM ioctl has the same arguments on 32-bit and 64-bit
architectures, so we can add it to the list of compatible ioctls and
drop it from compat_ioctl method of various filesystems.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ted Ts'o <tytso@google.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6f957724
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -896,6 +896,7 @@ COMPATIBLE_IOCTL(FIGETBSZ)
/* 'X' - originally XFS but some now in the VFS */
/* 'X' - originally XFS but some now in the VFS */
COMPATIBLE_IOCTL(FIFREEZE)
COMPATIBLE_IOCTL(FIFREEZE)
COMPATIBLE_IOCTL(FITHAW)
COMPATIBLE_IOCTL(FITHAW)
COMPATIBLE_IOCTL(FITRIM)
COMPATIBLE_IOCTL(KDGETKEYCODE)
COMPATIBLE_IOCTL(KDGETKEYCODE)
COMPATIBLE_IOCTL(KDSETKEYCODE)
COMPATIBLE_IOCTL(KDSETKEYCODE)
COMPATIBLE_IOCTL(KDGKBTYPE)
COMPATIBLE_IOCTL(KDGKBTYPE)
+0 −1
Original line number Original line Diff line number Diff line
@@ -325,7 +325,6 @@ ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		return rc;
		return rc;


	switch (cmd) {
	switch (cmd) {
	case FITRIM:
	case FS_IOC32_GETFLAGS:
	case FS_IOC32_GETFLAGS:
	case FS_IOC32_SETFLAGS:
	case FS_IOC32_SETFLAGS:
	case FS_IOC32_GETVERSION:
	case FS_IOC32_GETVERSION:
+0 −1
Original line number Original line Diff line number Diff line
@@ -755,7 +755,6 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		return err;
		return err;
	}
	}
	case EXT4_IOC_MOVE_EXT:
	case EXT4_IOC_MOVE_EXT:
	case FITRIM:
	case EXT4_IOC_RESIZE_FS:
	case EXT4_IOC_RESIZE_FS:
	case EXT4_IOC_PRECACHE_EXTENTS:
	case EXT4_IOC_PRECACHE_EXTENTS:
	case EXT4_IOC_SET_ENCRYPTION_POLICY:
	case EXT4_IOC_SET_ENCRYPTION_POLICY:
+0 −3
Original line number Original line Diff line number Diff line
@@ -180,9 +180,6 @@ long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
	case JFS_IOC_SETFLAGS32:
	case JFS_IOC_SETFLAGS32:
		cmd = JFS_IOC_SETFLAGS;
		cmd = JFS_IOC_SETFLAGS;
		break;
		break;
	case FITRIM:
		cmd = FITRIM;
		break;
	}
	}
	return jfs_ioctl(filp, cmd, arg);
	return jfs_ioctl(filp, cmd, arg);
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -1369,7 +1369,6 @@ long nilfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
	case NILFS_IOCTL_SYNC:
	case NILFS_IOCTL_SYNC:
	case NILFS_IOCTL_RESIZE:
	case NILFS_IOCTL_RESIZE:
	case NILFS_IOCTL_SET_ALLOC_RANGE:
	case NILFS_IOCTL_SET_ALLOC_RANGE:
	case FITRIM:
		break;
		break;
	default:
	default:
		return -ENOIOCTLCMD;
		return -ENOIOCTLCMD;
Loading