From: Markus Elfring Date: Sat, 6 May 2017 06:48:29 +0000 (+0200) Subject: dlm: Improve a size determination in dlm_recover_waiters_pre() X-Git-Tag: Ubuntu-5.2.0-15.16~6089^2~10 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=102e67d4e35858644e525ab7d798f1c89d7f4231;p=mirror_ubuntu-eoan-kernel.git dlm: Improve a size determination in dlm_recover_waiters_pre() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: David Teigland --- diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index fd6fe55bedae..ffadb817ad39 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5119,7 +5119,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls) int wait_type, stub_unlock_result, stub_cancel_result; int dir_nodeid; - ms_stub = kmalloc(sizeof(struct dlm_message), GFP_KERNEL); + ms_stub = kmalloc(sizeof(*ms_stub), GFP_KERNEL); if (!ms_stub) { log_error(ls, "dlm_recover_waiters_pre no mem"); return;