[2.6 patch] remove the in-kernel struct dirent{,64}

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Adrian Bunk
Date: Monday, June 9, 2008 - 3:27 pm

The kernel struct dirent{,64} were different from the ones in 
userspace.

Even worse, we exported the kernel ones to userspace.

But after the fat usages are fixed we can remove the conflicting 
kernel versions.

Reported-by: H. Peter Anvin <hpa@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

This patch has to be applied after the two patches that change fat to 
use __fat_fs_dirent.

 include/linux/Kbuild   |    1 -
 include/linux/dirent.h |   20 --------------------
 2 files changed, 21 deletions(-)

d447529e60e097e260ed43ca97b04dde36954c8b diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 93b9885..4d3649a 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -186,7 +186,6 @@ unifdef-y += connector.h
 unifdef-y += cuda.h
 unifdef-y += cyclades.h
 unifdef-y += dccp.h
-unifdef-y += dirent.h
 unifdef-y += dlm.h
 unifdef-y += dlm_plock.h
 unifdef-y += edd.h
diff --git a/include/linux/dirent.h b/include/linux/dirent.h
index 5d6023b..f072fb8 100644
--- a/include/linux/dirent.h
+++ b/include/linux/dirent.h
@@ -1,23 +1,6 @@
 #ifndef _LINUX_DIRENT_H
 #define _LINUX_DIRENT_H
 
-struct dirent {
-	long		d_ino;
-	__kernel_off_t	d_off;
-	unsigned short	d_reclen;
-	char		d_name[256]; /* We must not include limits.h! */
-};
-
-struct dirent64 {
-	__u64		d_ino;
-	__s64		d_off;
-	unsigned short	d_reclen;
-	unsigned char	d_type;
-	char		d_name[256];
-};
-
-#ifdef __KERNEL__
-
 struct linux_dirent64 {
 	u64		d_ino;
 	s64		d_off;
@@ -26,7 +9,4 @@ struct linux_dirent64 {
 	char		d_name[0];
 };
 
-#endif	/* __KERNEL__ */
-
-
 #endif

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[2.6.26 patch] fat_valid_media() isn't for userspace, Adrian Bunk, (Sun Jun 8, 11:43 am)
Re: [2.6.26 patch] fat_valid_media() isn't for userspace, OGAWA Hirofumi, (Sun Jun 8, 11:55 am)
Re: [2.6.26 patch] fat_valid_media() isn't for userspace, H. Peter Anvin, (Sun Jun 8, 6:14 pm)
Re: [2.6.26 patch] fat_valid_media() isn't for userspace, OGAWA Hirofumi, (Sun Jun 8, 9:12 pm)
Re: [2.6.26 patch] fat_valid_media() isn't for userspace, H. Peter Anvin, (Sun Jun 8, 9:41 pm)
[2.6 patch] remove the in-kernel struct dirent{,64}, Adrian Bunk, (Mon Jun 9, 3:27 pm)