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

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