ocfs2: Move ocfs2_complete_reflink to the right place.
[safe/jmp/linux-2.6] / fs / jfs / jfs_dtree.h
index 8561c6e..2545bb3 100644 (file)
@@ -74,7 +74,7 @@ struct idtentry {
 #define DTIHDRDATALEN  11
 
 /* compute number of slots for entry */
-#define        NDTINTERNAL(klen) ( ((4 + (klen)) + (15 - 1)) / 15 )
+#define        NDTINTERNAL(klen) (DIV_ROUND_UP((4 + (klen)), 15))
 
 
 /*
@@ -133,7 +133,7 @@ struct dir_table_slot {
        ( ((s64)((dts)->addr1)) << 32 | __le32_to_cpu((dts)->addr2) )
 
 /* compute number of slots for entry */
-#define        NDTLEAF_LEGACY(klen)    ( ((2 + (klen)) + (15 - 1)) / 15 )
+#define        NDTLEAF_LEGACY(klen)    (DIV_ROUND_UP((2 + (klen)), 15))
 #define        NDTLEAF NDTINTERNAL
 
 
@@ -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.
  */