提交 e2ffcf5c 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

fs/adfs/dir_fplus.c: use ARRAY_SIZE instead of sizeof/sizeof[0]

Use kernel.h definition.
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 834b18b2
......@@ -55,7 +55,7 @@ adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct
}
size >>= sb->s_blocksize_bits;
if (size > sizeof(dir->bh)/sizeof(dir->bh[0])) {
if (size > ARRAY_SIZE(dir->bh)) {
/* this directory is too big for fixed bh set, must allocate */
struct buffer_head **bh_fplus =
kzalloc(size * sizeof(struct buffer_head *),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册