nilfs2: use i_blocksize()

Since i_blocksize() helper has been defined in fs.h, use it instead of
open-coding.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Ryusuke Konishi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Geliang Tang 2017-02-27 14:28:38 -08:00 • committed by Linus Torvalds
commit f3048d17d1
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@
static inline unsigned long
nilfs_palloc_groups_per_desc_block(const struct inode *inode)
{
return (1UL << inode->i_blkbits) /
return i_blocksize(inode) /
sizeof(struct nilfs_palloc_group_desc);
}

View file

@ -119,7 +119,7 @@ nilfs_btree_node_set_nchildren(struct nilfs_btree_node *node, int nchildren)
static int nilfs_btree_node_size(const struct nilfs_bmap *btree)
{
return 1 << btree->b_inode->i_blkbits;
return i_blocksize(btree->b_inode);
}
static int nilfs_btree_nchildren_per_block(const struct nilfs_bmap *btree)