summaryrefslogtreecommitdiffstats
path: root/fs/ext4/dir.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-24 13:50:24 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-08-24 13:50:24 -0400
commitd695a1bea351276615ad270860bc1fbddcfbaeb3 (patch)
tree33004cb952ec2f739c35b15f3e870e6eb5bf1fc2 /fs/ext4/dir.c
parent1bd8d6cd3e413d64e543ec3e69ff43e75a1cf1ea (diff)
downloadlinux-d695a1bea351276615ad270860bc1fbddcfbaeb3.tar.bz2
ext4: use sizeof(*ptr)
Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r--fs/ext4/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index e8b365000d73..b04e882179c6 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -411,7 +411,7 @@ static struct dir_private_info *ext4_htree_create_dir_info(struct file *filp,
{
struct dir_private_info *p;
- p = kzalloc(sizeof(struct dir_private_info), GFP_KERNEL);
+ p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)
return NULL;
p->curr_hash = pos2maj_hash(filp, pos);