diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 442f7ef873fc..15b1047878ab 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -1115,6 +1115,14 @@ resizefs_out: | |||
1115 | case EXT4_IOC_GET_ENCRYPTION_POLICY: | 1115 | case EXT4_IOC_GET_ENCRYPTION_POLICY: |
1116 | return fscrypt_ioctl_get_policy(filp, (void __user *)arg); | 1116 | return fscrypt_ioctl_get_policy(filp, (void __user *)arg); |
1117 | 1117 | ||
1118 | case EXT4_IOC_CLEAR_ES_CACHE: | ||
1119 | { | ||
1120 | if (!inode_owner_or_capable(inode)) | ||
1121 | return -EACCES; | ||
1122 | ext4_clear_inode_es(inode); | ||
1123 | return 0; | ||
1124 | } | ||
1125 | |||
1118 | case EXT4_IOC_FSGETXATTR: | 1126 | case EXT4_IOC_FSGETXATTR: |
1119 | { | 1127 | { |
1120 | struct fsxattr fa; | 1128 | struct fsxattr fa; |
@@ -1233,6 +1241,7 @@ long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
1233 | case EXT4_IOC_GET_ENCRYPTION_POLICY: | 1241 | case EXT4_IOC_GET_ENCRYPTION_POLICY: |
1234 | case EXT4_IOC_SHUTDOWN: | 1242 | case EXT4_IOC_SHUTDOWN: |
1235 | case FS_IOC_GETFSMAP: | 1243 | case FS_IOC_GETFSMAP: |
1244 | case EXT4_IOC_CLEAR_ES_CACHE: | ||
1236 | break; | 1245 | break; |
1237 | default: | 1246 | default: |
1238 | return -ENOIOCTLCMD; | 1247 | return -ENOIOCTLCMD; |