diff options
author | Hyeongseok Kim | 2021-03-04 09:20:35 +0900 |
---|---|---|
committer | Namjae Jeon | 2021-04-27 20:45:06 +0900 |
commit | 654762df2ec7d61b05acc788afbffaba52d658fe (patch) | |
tree | cd003a28a9c79d4bab576e743fc1dea11467ff0b /fs/exfat/dir.c | |
parent | 5c2d728507299f84631ab8020d6f0f98f2cb8fc2 (diff) |
exfat: add support ioctl and FITRIM function
Add FITRIM ioctl to enable discarding unused blocks while mounted.
As current exFAT doesn't have generic ioctl handler, add empty ioctl
function first, and add FITRIM handler.
Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/dir.c')
-rw-r--r-- | fs/exfat/dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 916797077aad..e1d5536de948 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -4,6 +4,7 @@ */ #include <linux/slab.h> +#include <linux/compat.h> #include <linux/bio.h> #include <linux/buffer_head.h> @@ -306,6 +307,10 @@ const struct file_operations exfat_dir_operations = { .llseek = generic_file_llseek, .read = generic_read_dir, .iterate = exfat_iterate, + .unlocked_ioctl = exfat_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = exfat_compat_ioctl, +#endif .fsync = exfat_file_fsync, }; |