Skip to content

Commit

Permalink
fs/adfs/dir_fplus.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
Browse files Browse the repository at this point in the history
Use kernel.h definition.

Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Aug 8, 2014
1 parent 834b18b commit e2ffcf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/adfs/dir_fplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *),
Expand Down

0 comments on commit e2ffcf5

Please sign in to comment.