summaryrefslogtreecommitdiff
path: root/fs/nilfs2/alloc.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-02-28 01:28:38 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-28 05:43:46 +0300
commitf3048d17d1127f003db10fb8ac9a68610923f783 (patch)
tree93d49e3fce56599ff682779fbc1751c7ebfbc1ee /fs/nilfs2/alloc.c
parent1508ddc39ab421c0d0569017b9ca3a5b99b0815b (diff)
downloadlinux-f3048d17d1127f003db10fb8ac9a68610923f783.tar.xz
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/1485184655-3895-3-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/alloc.c')
-rw-r--r--fs/nilfs2/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c
index 2c90e285d7c6..03b8ba933eb2 100644
--- a/fs/nilfs2/alloc.c
+++ b/fs/nilfs2/alloc.c
@@ -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);
}