提交 102e67d4 编写于 作者: M Markus Elfring 提交者: David Teigland

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NDavid Teigland <teigland@redhat.com>
上级 fbb10081
...@@ -5119,7 +5119,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls) ...@@ -5119,7 +5119,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls)
int wait_type, stub_unlock_result, stub_cancel_result; int wait_type, stub_unlock_result, stub_cancel_result;
int dir_nodeid; int dir_nodeid;
ms_stub = kmalloc(sizeof(struct dlm_message), GFP_KERNEL); ms_stub = kmalloc(sizeof(*ms_stub), GFP_KERNEL);
if (!ms_stub) { if (!ms_stub) {
log_error(ls, "dlm_recover_waiters_pre no mem"); log_error(ls, "dlm_recover_waiters_pre no mem");
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册