Blame SOURCES/0027-fs-ntfs3-Remove-fat-ioctl-s-from-ntfs3-driver-for-no.patch

Kmods SIG d83023
From a97131c29c997e81b6fa1d1adf8f3ca07b63a2e1 Mon Sep 17 00:00:00 2001
Kmods SIG d83023
From: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG d83023
Date: Tue, 24 Aug 2021 21:20:20 +0300
Kmods SIG d83023
Subject: [Backport a97131c29c99] src: Remove fat ioctl's from ntfs3
Kmods SIG d83023
 driver for now
Kmods SIG d83023
Kmods SIG d83023
For some reason we have FAT ioctl calls. Even old ntfs driver did not
Kmods SIG d83023
use these. We should not use these because it his hard to get things out
Kmods SIG d83023
of kernel when they are upstream. That's why we remove these for now.
Kmods SIG d83023
Kmods SIG d83023
More discussion is needed what ioctl should be implemented and what is
Kmods SIG d83023
important.
Kmods SIG d83023
Kmods SIG d83023
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG d83023
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Kmods SIG d83023
---
Kmods SIG d83023
 src/file.c | 8 --------
Kmods SIG d83023
 1 file changed, 8 deletions(-)
Kmods SIG d83023
Kmods SIG d83023
diff --git a/src/file.c b/src/file.c
Kmods SIG d83023
index 26346771d9dc765c6faddc96913bca512e1f768a..62ebfa324bff5814d0937ac13a043a408e4d3f4d 100644
Kmods SIG d83023
--- a/src/file.c
Kmods SIG d83023
+++ b/src/file.c
Kmods SIG d83023
@@ -12,7 +12,6 @@
Kmods SIG d83023
 #include <linux/compat.h>
Kmods SIG d83023
 #include <linux/falloc.h>
Kmods SIG d83023
 #include <linux/fiemap.h>
Kmods SIG d83023
-#include <linux/msdos_fs.h> /* FAT_IOCTL_XXX */
Kmods SIG d83023
 #include <linux/nls.h>
Kmods SIG d83023
 
Kmods SIG d83023
 #include "debug.h"
Kmods SIG d83023
@@ -52,15 +51,8 @@ static long ntfs_ioctl(struct file *filp, u32 cmd, unsigned long arg)
Kmods SIG d83023
 {
Kmods SIG d83023
 	struct inode *inode = file_inode(filp);
Kmods SIG d83023
 	struct ntfs_sb_info *sbi = inode->i_sb->s_fs_info;
Kmods SIG d83023
-	u32 __user *user_attr = (u32 __user *)arg;
Kmods SIG d83023
 
Kmods SIG d83023
 	switch (cmd) {
Kmods SIG d83023
-	case FAT_IOCTL_GET_ATTRIBUTES:
Kmods SIG d83023
-		return put_user(le32_to_cpu(ntfs_i(inode)->std_fa), user_attr);
Kmods SIG d83023
-
Kmods SIG d83023
-	case FAT_IOCTL_GET_VOLUME_ID:
Kmods SIG d83023
-		return put_user(sbi->volume.ser_num, user_attr);
Kmods SIG d83023
-
Kmods SIG d83023
 	case FITRIM:
Kmods SIG d83023
 		return ntfs_ioctl_fitrim(sbi, arg);
Kmods SIG d83023
 	}
Kmods SIG d83023
-- 
Kmods SIG d83023
2.31.1
Kmods SIG d83023