提交 2ea55a2c 编写于 作者: J Joonsoo Kim 提交者: Linus Torvalds

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.
Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b00eeaed
......@@ -528,7 +528,7 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
static inline void update_used_max(struct zram *zram,
const unsigned long pages)
{
int old_max, cur_max;
unsigned long old_max, cur_max;
old_max = atomic_long_read(&zram->stats.max_used_pages);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册