diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-06 02:48:29 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-08-07 12:23:09 -0400 |
commit | 102e67d4e35858644e525ab7d798f1c89d7f4231 (patch) | |
tree | ef7a1c6afb800eed0458707af3816e182f850aa4 /fs/dlm | |
parent | fbb1008151cabb83aeadf91ae363196def070eba (diff) |
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 <elfring@users.sourceforge.net>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lock.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
5119 | int wait_type, stub_unlock_result, stub_cancel_result; | 5119 | int wait_type, stub_unlock_result, stub_cancel_result; |
5120 | int dir_nodeid; | 5120 | int dir_nodeid; |
5121 | 5121 | ||
5122 | ms_stub = kmalloc(sizeof(struct dlm_message), GFP_KERNEL); | 5122 | ms_stub = kmalloc(sizeof(*ms_stub), GFP_KERNEL); |
5123 | if (!ms_stub) { | 5123 | if (!ms_stub) { |
5124 | log_error(ls, "dlm_recover_waiters_pre no mem"); | 5124 | log_error(ls, "dlm_recover_waiters_pre no mem"); |
5125 | return; | 5125 | return; |