Skip to contentSkip to conversation

fs/ntfs3: Remove fat ioctl's from ntfs3 driver for now

PATCH Applied Kari Argillander 2 participants 2 messages Aug 24, 2021 – Aug 31, 2021 NTFS3 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: Remove fat ioctl's from ntfs3 driver for now

For some reason we have FAT ioctl calls. Even old ntfs driver did not use these. We should not use these because it his hard to get things out of kernel when they are upstream. That's why we remove these for now.

More discussion is needed what ioctl should be implemented and what is important.

---
Earlier disgussion with Pali can be founded here:
lore.kernel.org/linux-fsdevel/20210824113304.eabzy7ulbuouzlac@pali/

---
 fs/ntfs3/file.c | 8 --------
 1 file changed, 8 deletions(-)
fs/ntfs3/file.c +0 -8
index 59344985c2e8..819afc4c902b 100644
@@ -10,7 +10,6 @@
 #include <linux/compat.h>
 #include <linux/falloc.h>
 #include <linux/fiemap.h>
-#include <linux/msdos_fs.h> /* FAT_IOCTL_XXX */
 #include <linux/nls.h>
 
 #include "debug.h"
@@ -50,15 +49,8 @@ static long ntfs_ioctl(struct file *filp, u32 cmd, unsigned long arg)
 {
 	struct inode *inode = file_inode(filp);
 	struct ntfs_sb_info *sbi = inode->i_sb->s_fs_info;
-	u32 __user *user_attr = (u32 __user *)arg;
 
 	switch (cmd) {
-	case FAT_IOCTL_GET_ATTRIBUTES:
-		return put_user(le32_to_cpu(ntfs_i(inode)->std_fa), user_attr);
-
-	case FAT_IOCTL_GET_VOLUME_ID:
-		return put_user(sbi->volume.ser_num, user_attr);
-
 	case FITRIM:
 		return ntfs_ioctl_fitrim(sbi, arg);
 	}
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw
Quoted 34 lines · Kari Argillander

For some reason we have FAT ioctl calls. Even old ntfs driver did not use these. We should not use these because it his hard to get things out of kernel when they are upstream. That's why we remove these for now.

More discussion is needed what ioctl should be implemented and what is important.

---
Earlier disgussion with Pali can be founded here:
lore.kernel.org/linux-fsdevel/20210824113304.eabzy7ulbuouzlac@pali/

---
 fs/ntfs3/file.c | 8 --------
 1 file changed, 8 deletions(-)
fs/ntfs3/file.c +0 -2
index 59344985c2e8..819afc4c902b 100644
@@ -10,7 +10,6 @@
 #include <linux/compat.h>
 #include <linux/falloc.h>
 #include <linux/fiemap.h>
-#include <linux/msdos_fs.h> /* FAT_IOCTL_XXX */
 #include <linux/nls.h>
 
 #include "debug.h"
@@ -50,15 +49,8 @@ static long ntfs_ioctl(struct file *filp, u32 cmd, unsigned long arg)
 {
 	struct inode *inode = file_inode(filp);
 	struct ntfs_sb_info *sbi = inode->i_sb->s_fs_info;
-	u32 __user *user_attr = (u32 __user *)arg;
 

fs/ntfs3/file.c static long ntfs_ioctl(struct file *filp, u32 cmd, unsigned long arg) · line 56

Quoted 10 lines
fs/ntfs3/file.c +0 -6
 	switch (cmd) {
-	case FAT_IOCTL_GET_ATTRIBUTES:
-		return put_user(le32_to_cpu(ntfs_i(inode)->std_fa), user_attr);
-
-	case FAT_IOCTL_GET_VOLUME_ID:
-		return put_user(sbi->volume.ser_num, user_attr);
-
 	case FITRIM:
 		return ntfs_ioctl_fitrim(sbi, arg);
 	}

Hi, Kari!

Applied, thanks.

Best regards.