Fix abdstats kstat on 32-bit systems
When decrementing the struct_size and scatter_chunk_waste kstats the value needs to be cast to an int on 32-bit systems. Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #6721
This commit is contained in:
parent
a0430cc5a9
commit
57f4ef2e81
|
@ -571,7 +571,7 @@ static inline void
|
|||
abd_free_struct(abd_t *abd)
|
||||
{
|
||||
kmem_cache_free(abd_cache, abd);
|
||||
ABDSTAT_INCR(abdstat_struct_size, -sizeof (abd_t));
|
||||
ABDSTAT_INCR(abdstat_struct_size, -(int)sizeof (abd_t));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -618,7 +618,7 @@ abd_free_scatter(abd_t *abd)
|
|||
ABDSTAT_BUMPDOWN(abdstat_scatter_cnt);
|
||||
ABDSTAT_INCR(abdstat_scatter_data_size, -(int)abd->abd_size);
|
||||
ABDSTAT_INCR(abdstat_scatter_chunk_waste,
|
||||
abd->abd_size - P2ROUNDUP(abd->abd_size, PAGESIZE));
|
||||
(int)abd->abd_size - (int)P2ROUNDUP(abd->abd_size, PAGESIZE));
|
||||
|
||||
abd_free_struct(abd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue