diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_dtree.h | 4 | ||||
-rw-r--r-- | fs/jfs/resize.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/jfs/jfs_dtree.h b/fs/jfs/jfs_dtree.h index 8561c6ecece0..cdac2d5bafeb 100644 --- a/fs/jfs/jfs_dtree.h +++ b/fs/jfs/jfs_dtree.h | |||
@@ -74,7 +74,7 @@ struct idtentry { | |||
74 | #define DTIHDRDATALEN 11 | 74 | #define DTIHDRDATALEN 11 |
75 | 75 | ||
76 | /* compute number of slots for entry */ | 76 | /* compute number of slots for entry */ |
77 | #define NDTINTERNAL(klen) ( ((4 + (klen)) + (15 - 1)) / 15 ) | 77 | #define NDTINTERNAL(klen) (DIV_ROUND_UP((4 + (klen)), 15)) |
78 | 78 | ||
79 | 79 | ||
80 | /* | 80 | /* |
@@ -133,7 +133,7 @@ struct dir_table_slot { | |||
133 | ( ((s64)((dts)->addr1)) << 32 | __le32_to_cpu((dts)->addr2) ) | 133 | ( ((s64)((dts)->addr1)) << 32 | __le32_to_cpu((dts)->addr2) ) |
134 | 134 | ||
135 | /* compute number of slots for entry */ | 135 | /* compute number of slots for entry */ |
136 | #define NDTLEAF_LEGACY(klen) ( ((2 + (klen)) + (15 - 1)) / 15 ) | 136 | #define NDTLEAF_LEGACY(klen) (DIV_ROUND_UP((2 + (klen)), 15)) |
137 | #define NDTLEAF NDTINTERNAL | 137 | #define NDTLEAF NDTINTERNAL |
138 | 138 | ||
139 | 139 | ||
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index 71984ee95346..7f24a0bb08ca 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c | |||
@@ -172,7 +172,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) | |||
172 | */ | 172 | */ |
173 | t64 = ((newLVSize - newLogSize + BPERDMAP - 1) >> L2BPERDMAP) | 173 | t64 = ((newLVSize - newLogSize + BPERDMAP - 1) >> L2BPERDMAP) |
174 | << L2BPERDMAP; | 174 | << L2BPERDMAP; |
175 | t32 = ((t64 + (BITSPERPAGE - 1)) / BITSPERPAGE) + 1 + 50; | 175 | t32 = DIV_ROUND_UP(t64, BITSPERPAGE) + 1 + 50; |
176 | newFSCKSize = t32 << sbi->l2nbperpage; | 176 | newFSCKSize = t32 << sbi->l2nbperpage; |
177 | newFSCKAddress = newLogAddress - newFSCKSize; | 177 | newFSCKAddress = newLogAddress - newFSCKSize; |
178 | 178 | ||