History

zram: use proper type to update max_used_pages

max_used_pages is defined as atomic_long_t so we need to use unsigned long to keep temporary value for it rather than int which is smaller than unsigned long in a 64 bit system.

Joonsoo Kim committed 11 years ago

Commit 2ea55a21 parent b00eeae1 file · +1 −1Browse files

Unified · Split

drivers/block/zram/zram_drv.c+1−1
@@ -528,7 +528,7 @@ out_cleanup: · 527 unmodified lines
528528 static inline void update_used_max(struct zram *zram,
529529 const unsigned long pages)
530530 {
531− int old_max, cur_max;
531+ unsigned long old_max, cur_max;
532532
533533 old_max = atomic_long_read(&zram->stats.max_used_pages);
534534