OSDN Git Service

dm log writes: use struct_size() to calculate size of pending_block
authorZhengyuan Liu <liuzhengyuan@kylinos.cn>
Wed, 12 Jun 2019 06:14:46 +0000 (14:14 +0800)
committerMike Snitzer <snitzer@redhat.com>
Tue, 9 Jul 2019 18:08:41 +0000 (14:08 -0400)
commitd4e6e83651777224c0259e01dde5eb078f9e6b1d
tree123ff406b79daba7e310c37f0ca20e6cd8414dfd
parent9c81c99b242f1241e18573d1ce29f7479c168e38
dm log writes: use struct_size() to calculate size of pending_block

Use struct_size() to avoid open-coded equivalent that is prone to a type
mistake.

Signed-off-by: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-log-writes.c