Skip to contentSkip to conversation

jfs: remove DIRENTSIZ

PATCH In review Adrian Bunk 2 participants 2 messages Jun 9, 2008 – Jun 10, 2008 JFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jfs: remove DIRENTSIZ

After fat gets fixed the unused DIRENTSIZ macro was the last user of struct dirent we should get rid of since the kernel and userspace versions differed.

---
89432c9b7ff2cd2e29fc5f2edde120dc38a89f46 diff --git a/fs/jfs/jfs_dtree.h b/fs/jfs/jfs_dtree.h index cdac2d5..2545bb3 100644

fs/jfs/jfs_dtree.h +0 -3
@@ -243,9 +243,6 @@ typedef union {
 #define JFS_REMOVE 3
 #define JFS_RENAME 4
 
-#define DIRENTSIZ(namlen) \
-    ( (sizeof(struct dirent) - 2*(JFS_NAME_MAX+1) + 2*((namlen)+1) + 3) &~ 3 )
-
 /*
  * Maximum file offset for directories.
  */
#1 lore raw

Ack.

Added to the jfs git tree. As this is an unused macro, removing the definition of struct dirent shouldn't depend on this patch. Expect it to make the 2.6.27 merge window.

Thanks,
Shaggy

Quoted 22 lines · Adrian Bunk

After fat gets fixed the unused DIRENTSIZ macro was the last user of struct dirent we should get rid of since the kernel and userspace versions differed.

---
89432c9b7ff2cd2e29fc5f2edde120dc38a89f46 diff --git a/fs/jfs/jfs_dtree.h b/fs/jfs/jfs_dtree.h index cdac2d5..2545bb3 100644

fs/jfs/jfs_dtree.h +0 -3
@@ -243,9 +243,6 @@ typedef union {
 #define JFS_REMOVE 3
 #define JFS_RENAME 4
 
-#define DIRENTSIZ(namlen) \
-    ( (sizeof(struct dirent) - 2*(JFS_NAME_MAX+1) + 2*((namlen)+1) + 3) &~ 3 )
-
 /*
  * Maximum file offset for directories.
  */
Signature · 2 lines
David Kleikamp
IBM Linux Technology Center