diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-04-26 07:59:52 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-06 21:21:56 -0400 |
commit | 6403eb1f646a49cc92f25c08f8716f8870a4a865 (patch) | |
tree | 31bb16630a67a086d0ff271cea88b9c9bc3e301b /fs/f2fs/file.c | |
parent | 2aea39eca6b68d6ae7eb545332df0695f56a3d3f (diff) |
f2fs: introduce help macro ADDRS_PER_PAGE()
Introduce help macro ADDRS_PER_PAGE() to get the number of address pointers in
direct node or inode.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 60e7d5448a1d..bb365c932555 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -288,10 +288,7 @@ int truncate_blocks(struct inode *inode, u64 from) | |||
288 | return err; | 288 | return err; |
289 | } | 289 | } |
290 | 290 | ||
291 | if (IS_INODE(dn.node_page)) | 291 | count = ADDRS_PER_PAGE(dn.node_page, F2FS_I(inode)); |
292 | count = ADDRS_PER_INODE(F2FS_I(inode)); | ||
293 | else | ||
294 | count = ADDRS_PER_BLOCK; | ||
295 | 292 | ||
296 | count -= dn.ofs_in_node; | 293 | count -= dn.ofs_in_node; |
297 | f2fs_bug_on(count < 0); | 294 | f2fs_bug_on(count < 0); |