diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 5703d607f5af..5444d49cbf09 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -1198,6 +1198,17 @@ out: | |||
1198 | } | 1198 | } |
1199 | case EXT4_IOC_SHUTDOWN: | 1199 | case EXT4_IOC_SHUTDOWN: |
1200 | return ext4_shutdown(sb, arg); | 1200 | return ext4_shutdown(sb, arg); |
1201 | |||
1202 | case FS_IOC_ENABLE_VERITY: | ||
1203 | if (!ext4_has_feature_verity(sb)) | ||
1204 | return -EOPNOTSUPP; | ||
1205 | return fsverity_ioctl_enable(filp, (const void __user *)arg); | ||
1206 | |||
1207 | case FS_IOC_MEASURE_VERITY: | ||
1208 | if (!ext4_has_feature_verity(sb)) | ||
1209 | return -EOPNOTSUPP; | ||
1210 | return fsverity_ioctl_measure(filp, (void __user *)arg); | ||
1211 | |||
1201 | default: | 1212 | default: |
1202 | return -ENOTTY; | 1213 | return -ENOTTY; |
1203 | } | 1214 | } |
@@ -1265,6 +1276,8 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
1265 | case FS_IOC_GET_ENCRYPTION_KEY_STATUS: | 1276 | case FS_IOC_GET_ENCRYPTION_KEY_STATUS: |
1266 | case EXT4_IOC_SHUTDOWN: | 1277 | case EXT4_IOC_SHUTDOWN: |
1267 | case FS_IOC_GETFSMAP: | 1278 | case FS_IOC_GETFSMAP: |
1279 | case FS_IOC_ENABLE_VERITY: | ||
1280 | case FS_IOC_MEASURE_VERITY: | ||
1268 | break; | 1281 | break; |
1269 | default: | 1282 | default: |
1270 | return -ENOIOCTLCMD; | 1283 | return -ENOIOCTLCMD; |