mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
fs/adfs/dir_fplus.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
Use kernel.h definition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
834b18b23e
commit
e2ffcf5c7e
@ -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 *),
|
||||
|
Loading…
Reference in New Issue
Block a user