summaryrefslogtreecommitdiffstats
path: root/fs/ext4/mmp.c
diff options
context:
space:
mode:
authorMarkus Elfring2017-08-24 19:50:24 +0200
committerTheodore Ts'o2017-08-24 19:50:24 +0200
commitd695a1bea351276615ad270860bc1fbddcfbaeb3 (patch)
tree33004cb952ec2f739c35b15f3e870e6eb5bf1fc2 /fs/ext4/mmp.c
parentext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets (diff)
downloadkernel-qcow2-linux-d695a1bea351276615ad270860bc1fbddcfbaeb3.tar.gz
kernel-qcow2-linux-d695a1bea351276615ad270860bc1fbddcfbaeb3.tar.xz
kernel-qcow2-linux-d695a1bea351276615ad270860bc1fbddcfbaeb3.zip
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/mmp.c')
-rw-r--r--fs/ext4/mmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index eb9835638680..77cdce1f17ce 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -367,7 +367,7 @@ skip:
goto failed;
}
- mmpd_data = kmalloc(sizeof(struct mmpd_data), GFP_KERNEL);
+ mmpd_data = kmalloc(sizeof(*mmpd_data), GFP_KERNEL);
if (!mmpd_data) {
ext4_warning(sb, "not enough memory for mmpd_data");
goto failed;