Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Mikulas Patocka <mpatocka@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ted Ts'o <tytso@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mikulas Patocka and committed by
Linus Torvalds
9abea2d6 6f957724

+1 -7
+1
fs/compat_ioctl.c
··· 896 896 /* 'X' - originally XFS but some now in the VFS */ 897 897 COMPATIBLE_IOCTL(FIFREEZE) 898 898 COMPATIBLE_IOCTL(FITHAW) 899 + COMPATIBLE_IOCTL(FITRIM) 899 900 COMPATIBLE_IOCTL(KDGETKEYCODE) 900 901 COMPATIBLE_IOCTL(KDSETKEYCODE) 901 902 COMPATIBLE_IOCTL(KDGKBTYPE)
-1
fs/ecryptfs/file.c
··· 325 325 return rc; 326 326 327 327 switch (cmd) { 328 - case FITRIM: 329 328 case FS_IOC32_GETFLAGS: 330 329 case FS_IOC32_SETFLAGS: 331 330 case FS_IOC32_GETVERSION:
-1
fs/ext4/ioctl.c
··· 755 755 return err; 756 756 } 757 757 case EXT4_IOC_MOVE_EXT: 758 - case FITRIM: 759 758 case EXT4_IOC_RESIZE_FS: 760 759 case EXT4_IOC_PRECACHE_EXTENTS: 761 760 case EXT4_IOC_SET_ENCRYPTION_POLICY:
-3
fs/jfs/ioctl.c
··· 180 180 case JFS_IOC_SETFLAGS32: 181 181 cmd = JFS_IOC_SETFLAGS; 182 182 break; 183 - case FITRIM: 184 - cmd = FITRIM; 185 - break; 186 183 } 187 184 return jfs_ioctl(filp, cmd, arg); 188 185 }
-1
fs/nilfs2/ioctl.c
··· 1369 1369 case NILFS_IOCTL_SYNC: 1370 1370 case NILFS_IOCTL_RESIZE: 1371 1371 case NILFS_IOCTL_SET_ALLOC_RANGE: 1372 - case FITRIM: 1373 1372 break; 1374 1373 default: 1375 1374 return -ENOIOCTLCMD;
-1
fs/ocfs2/ioctl.c
··· 980 980 case OCFS2_IOC_GROUP_EXTEND: 981 981 case OCFS2_IOC_GROUP_ADD: 982 982 case OCFS2_IOC_GROUP_ADD64: 983 - case FITRIM: 984 983 break; 985 984 case OCFS2_IOC_REFLINK: 986 985 if (copy_from_user(&args, argp, sizeof(args)))