projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834b18b
)
fs/adfs/dir_fplus.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
author
Fabian Frederick
<fabf@skynet.be>
Fri, 8 Aug 2014 21:22:22 +0000
(14:22 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:24 +0000
(15:57 -0700)
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>
fs/adfs/dir_fplus.c
patch
|
blob
|
history
diff --git
a/fs/adfs/dir_fplus.c
b/fs/adfs/dir_fplus.c
index d9e3bee4e653ff2c6df48006ddcdb3119082233a..7673c1fdbfc090e3c715b99a48baeba234ed4a92 100644
(file)
--- a/
fs/adfs/dir_fplus.c
+++ b/
fs/adfs/dir_fplus.c
@@
-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 *),