From patchwork Fri Sep 6 14:14:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13794249 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF2281DFE1; Fri, 6 Sep 2024 14:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632129; cv=none; b=cZbGAshn0e1G9dJus/pzpGEQKDksG/5TrYXc4xCVlunGy1YbPQ3Ckb/olOvvSdtKbV9l07cc7DNX1wuqQHu8WPHb3qF5uKdzkxG/Vx7o/tz7kPy+wFVO5+FcuVlWA980c+YAuxhdjyOpGIESP9XbHJOZ+VOqugY5oZJauLuas6g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632129; c=relaxed/simple; bh=BORmgJoSQwYfrE3e7mKqsG9MIXmz5U3HaHwYflO/6pM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o7NPxEMG9glAE9enqyZ27CiO/L0hP+gLx0xdv7YqiupsUDrVDjEJEcxr2H5NgeyukWiB7B1q1mc268rZbUpWN19coSO3k7RAvoMliZVNUTbEsv0R4bzGMpggSERsJhSnHZ7bvvHI6Ig18sRzy6iz8Gn/BzrLm8z7PIc/9AVlLH8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JwHOBp/a; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WED7K7j5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JwHOBp/a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WED7K7j5" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IjnaATEHBxbr+FrbsOxAqcu8XbXNUvS85WStCDTlyQs=; b=JwHOBp/aFMoU729gI+q/YSh05mS4IhcboKywbud3u0fBjRGR0gVCz47nhIJGrGabb0MnlL ZBunn/pTI1T55+jOR/Rq0GcWzq35bmDv09n/uR7eg0pQigqzqQiN/kCXqwZtBb10XHdbby Pews5SSjP2rpFu6BZaKggfA8Lt8KIoMwIo/oLjYFKjKRIDYZlpgqWt7BAUOIzsAfS7OIqX 9Y+n6/PfMyUzN+O4znK4bhN64Y7Cg8+eeJVUuxGZBu5jEv/je3IgEawiyqmdHtY1CUj3o5 EYmZumaUxRPdA/JQPoe/HxGD7T5sAdHKPl07IZWExaaAdwa+3bN5jEDx+rk9+g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IjnaATEHBxbr+FrbsOxAqcu8XbXNUvS85WStCDTlyQs=; b=WED7K7j5PvSeOEc2zvKwIk6/lJufbT80xRUNViiK/4mtBtgX/JZHu16zXdhKt2ZVksMKRq g/Q+gom+3vs/t0DQ== To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Mike Galbraith , Minchan Kim , Sergey Senozhatsky , Thomas Gleixner , Alexander Lobakin , Sebastian Andrzej Siewior Subject: [PATCH v4 1/3] zram: Replace bit spinlocks with a spinlock_t. Date: Fri, 6 Sep 2024 16:14:43 +0200 Message-ID: <20240906141520.730009-2-bigeasy@linutronix.de> In-Reply-To: <20240906141520.730009-1-bigeasy@linutronix.de> References: <20240906141520.730009-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mike Galbraith The bit spinlock disables preemption. The spinlock_t lock becomes a sleeping lock on PREEMPT_RT and it can not be acquired in this context. In this locked section, zs_free() acquires a zs_pool::lock, and there is access to zram::wb_limit_lock. Add a spinlock_t for locking. Keep the set/ clear ZRAM_LOCK bit after the lock has been acquired/ dropped. The size of struct zram_table_entry increases by 4 bytes due to lock and additional 4 bytes padding with CONFIG_ZRAM_TRACK_ENTRY_ACTIME enabled. Signed-off-by: Mike Galbraith Reviewed-by: Sergey Senozhatsky Signed-off-by: Sebastian Andrzej Siewior --- drivers/block/zram/zram_drv.c | 18 ++++++++++++++---- drivers/block/zram/zram_drv.h | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 1f1bf175a6c34..0f35e1f20b18e 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -60,17 +60,24 @@ static int zram_read_page(struct zram *zram, struct page *page, u32 index, static int zram_slot_trylock(struct zram *zram, u32 index) { - return bit_spin_trylock(ZRAM_LOCK, &zram->table[index].flags); + int ret; + + ret = spin_trylock(&zram->table[index].lock); + if (ret) + __set_bit(ZRAM_LOCK, &zram->table[index].flags); + return ret; } static void zram_slot_lock(struct zram *zram, u32 index) { - bit_spin_lock(ZRAM_LOCK, &zram->table[index].flags); + spin_lock(&zram->table[index].lock); + __set_bit(ZRAM_LOCK, &zram->table[index].flags); } static void zram_slot_unlock(struct zram *zram, u32 index) { - bit_spin_unlock(ZRAM_LOCK, &zram->table[index].flags); + __clear_bit(ZRAM_LOCK, &zram->table[index].flags); + spin_unlock(&zram->table[index].lock); } static inline bool init_done(struct zram *zram) @@ -1309,7 +1316,7 @@ static void zram_meta_free(struct zram *zram, u64 disksize) static bool zram_meta_alloc(struct zram *zram, u64 disksize) { - size_t num_pages; + size_t num_pages, index; num_pages = disksize >> PAGE_SHIFT; zram->table = vzalloc(array_size(num_pages, sizeof(*zram->table))); @@ -1324,6 +1331,9 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) if (!huge_class_size) huge_class_size = zs_huge_class_size(zram->mem_pool); + + for (index = 0; index < num_pages; index++) + spin_lock_init(&zram->table[index].lock); return true; } diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h index b976824ead676..7aeff672b96f1 100644 --- a/drivers/block/zram/zram_drv.h +++ b/drivers/block/zram/zram_drv.h @@ -69,6 +69,7 @@ struct zram_table_entry { unsigned long element; }; unsigned long flags; + spinlock_t lock; #ifdef CONFIG_ZRAM_TRACK_ENTRY_ACTIME ktime_t ac_time; #endif From patchwork Fri Sep 6 14:14:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13794250 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 843A21EEF9; Fri, 6 Sep 2024 14:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632130; cv=none; b=RiWE+SVI7IUrtkTUj7uEn11CKzzGGFfmlEcMJccYDd1V8R/+cezmMC/cbkpg/cY5DeM18y/qEUBHG8CK/EAVwggGRbokHEQqLAZ9dJdX6MCfkjCZYZWuJacq5jPBnViepNvphU4qghkrWCdUJehsI02739cjT8pO/L2WovQV+Es= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632130; c=relaxed/simple; bh=8/zwkS1rxYN1diseW44JSveH37dGY5RFGGhuvR7gT8s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HQC5eyWrTJ0x/2qtmsuqbrGvozcsxvVDkqQ1NfWGmtSnQs0hxIf1dR1LSNU44W+HltLHMeNrrTpj8vwond/y0SL/gCRIzbE7jczF9wSMb6fExfDxTij/H6+MezhaFtnaUnUHsK2vbBZE/sB7+YVVq23eqdj2Ap6VlHJpIxje4XA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=d/2GEqtO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=QRqBVOXy; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d/2GEqtO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="QRqBVOXy" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=umJapnkXBR6kFECASvWK2vZ+TNTWobwp/1YzsGOxZzI=; b=d/2GEqtO01UVV116bf8k+jkc0cqkwRQiVZ1eIpwrbgdo9H8zGuA8o4fh8eCXnDUugRlBgn MXPsfNT0xDK+f95mENCAenFookwst3syJpWPPuhpRg0E5cjlzACg45UwomWpIrQoGfDPsc fiC69q67vYAXIve3vKY34fNJmCDYvqaqXMTYXSpKED1KC4vhiM+XM+EXN4HO+w7lyZ+LFE jruER2ow7soU4zi0B5uzeQuZzzFbMSQbCSy3JBDX7pOe9mUy0I9iuCADI04RpkPXavLg31 Y7yRCG1Iy/0SU9nE8+GiXHflhcIP4oNZ9iepGfni954vWYWSgl+9ObIsHHzo+g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=umJapnkXBR6kFECASvWK2vZ+TNTWobwp/1YzsGOxZzI=; b=QRqBVOXyD9Is/gBtihRrPNuybgwUgzKNXtFUiisyuISsFNeSKxp7Z6sWQne0ajLg4OGjkD CgLdiNiW2uStTnDg== To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Mike Galbraith , Minchan Kim , Sergey Senozhatsky , Thomas Gleixner , Alexander Lobakin , Sebastian Andrzej Siewior Subject: [PATCH v4 2/3] zram: Remove ZRAM_LOCK Date: Fri, 6 Sep 2024 16:14:44 +0200 Message-ID: <20240906141520.730009-3-bigeasy@linutronix.de> In-Reply-To: <20240906141520.730009-1-bigeasy@linutronix.de> References: <20240906141520.730009-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The ZRAM_LOCK was used for locking and after the addition of spinlock_t the bit set and cleared but there no reader of it. Remove the ZRAM_LOCK bit. Reviewed-by: Sergey Senozhatsky Signed-off-by: Sebastian Andrzej Siewior --- drivers/block/zram/zram_drv.c | 11 ++--------- drivers/block/zram/zram_drv.h | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 0f35e1f20b18e..812d4e7a6b7f0 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -60,23 +60,16 @@ static int zram_read_page(struct zram *zram, struct page *page, u32 index, static int zram_slot_trylock(struct zram *zram, u32 index) { - int ret; - - ret = spin_trylock(&zram->table[index].lock); - if (ret) - __set_bit(ZRAM_LOCK, &zram->table[index].flags); - return ret; + return spin_trylock(&zram->table[index].lock); } static void zram_slot_lock(struct zram *zram, u32 index) { spin_lock(&zram->table[index].lock); - __set_bit(ZRAM_LOCK, &zram->table[index].flags); } static void zram_slot_unlock(struct zram *zram, u32 index) { - __clear_bit(ZRAM_LOCK, &zram->table[index].flags); spin_unlock(&zram->table[index].lock); } @@ -1391,7 +1384,7 @@ static void zram_free_page(struct zram *zram, size_t index) zram_set_handle(zram, index, 0); zram_set_obj_size(zram, index, 0); WARN_ON_ONCE(zram->table[index].flags & - ~(1UL << ZRAM_LOCK | 1UL << ZRAM_UNDER_WB)); + ~(1UL << ZRAM_UNDER_WB)); } /* diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h index 7aeff672b96f1..d5eef65870380 100644 --- a/drivers/block/zram/zram_drv.h +++ b/drivers/block/zram/zram_drv.h @@ -45,9 +45,7 @@ /* Flags for zram pages (table[page_no].flags) */ enum zram_pageflags { - /* zram slot is locked */ - ZRAM_LOCK = ZRAM_FLAG_SHIFT, - ZRAM_SAME, /* Page consists the same element */ + ZRAM_SAME = ZRAM_FLAG_SHIFT, /* Page consists the same element */ ZRAM_WB, /* page is stored on backing_device */ ZRAM_UNDER_WB, /* page is under writeback */ ZRAM_HUGE, /* Incompressible page */ From patchwork Fri Sep 6 14:14:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13794251 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 843EB14A4D4; Fri, 6 Sep 2024 14:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632130; cv=none; b=FydvHNUVPd4gKJpG1XJ5b/ZKn7OQFm7Q1dmXZVMBQlurfYIgF6DXYJARbtwBYLOLBneEQE/XiJeoMigFG6Vdl5/XywF/XM4YpXPX5plorNjOYues1rnrTMaRRgsbEboZqIqtc9MqykolZptwhybhI7ZMaBnGtUSE2g2TqM1qyXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725632130; c=relaxed/simple; bh=QjBFR8Cv45PIRbG0Fj79uwa3syvnxEr+tQxCT2GeG8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uJFNFYQZjk/tc4KTrdn7GOYJHy9Z5Km51+tIvQX4Z4QNc7ykBptWb1qWQUdiiD9JJnIDVhEFVSmIKKnU25EJoYpUlavxmAWFgGBl2+rwZDJ2IJ2sEpceOr2TjcSUGYo21ILOhnlTKkLpA3o0pcD7VjJTePXyJwzGOCbeu/BYCc4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ts8d8diM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=uo9g46lb; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ts8d8diM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uo9g46lb" From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HB9XvqsdsFhVzFD1qVrKi/1/vC+PA6yeOC9ealVuGUA=; b=ts8d8diMapn60eme3T4BVIkDKcnuLn2VwEzAPcAhep8CEc3yqIWMDTAYm4qU6NCi+HcKjz rQk0cBYrhuqrf+MimJb7HEGscNSW/37zX1TDLulPgOcOsJFq+MxcztktVX07qjCMdvH9/h 7N5u6GrSSf67I74q4wkpI3N5XvGUP1PBiYA8oRdv85yVyY0cFxldi8qZ8+qVaH7ncHjdAN A1lfPPuqFfyU67FDJyha9fPkgEfiw1VISp/Xa5u2L5y2yKjGICujqg/JyorhoaZ8VpjVLe H5itrxZQUYbC6/8A1StREvRorN32+h1glpp4a7JNpjhXIMD3Fbg+rNSh9FJgIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1725632126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HB9XvqsdsFhVzFD1qVrKi/1/vC+PA6yeOC9ealVuGUA=; b=uo9g46lb0zjj3RdVI0LVIIoLySNz74MCbZ0lKqpsgS07QqUO7QnMvw1iptsqGDQjlNXSxL hp/6Pdh23xDEB+DA== To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Mike Galbraith , Minchan Kim , Sergey Senozhatsky , Thomas Gleixner , Alexander Lobakin , Sebastian Andrzej Siewior Subject: [PATCH v4 3/3] zram: Shrink zram_table_entry::flags. Date: Fri, 6 Sep 2024 16:14:45 +0200 Message-ID: <20240906141520.730009-4-bigeasy@linutronix.de> In-Reply-To: <20240906141520.730009-1-bigeasy@linutronix.de> References: <20240906141520.730009-1-bigeasy@linutronix.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The zram_table_entry::flags member is of type long and uses 8 bytes on a 64bit architecture. With a PAGE_SIZE of 256KiB we have PAGE_SHIFT of 18 which in turn leads to __NR_ZRAM_PAGEFLAGS = 27. This still fits in an ordinary integer. By reducing the size of `flags' to four bytes, the size of the struct goes back to 16 bytes. The padding between the lock and ac_time (if enabled) is also gone. Make zram_table_entry::flags an unsigned int and update the build test to reflect the change. Reviewed-by: Sergey Senozhatsky Signed-off-by: Sebastian Andrzej Siewior --- drivers/block/zram/zram_drv.c | 3 ++- drivers/block/zram/zram_drv.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 812d4e7a6b7f0..f8206ba6cbbba 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -2532,9 +2532,10 @@ static void destroy_devices(void) static int __init zram_init(void) { + struct zram_table_entry zram_te; int ret; - BUILD_BUG_ON(__NR_ZRAM_PAGEFLAGS > BITS_PER_LONG); + BUILD_BUG_ON(__NR_ZRAM_PAGEFLAGS > sizeof(zram_te.flags) * 8); ret = cpuhp_setup_state_multi(CPUHP_ZCOMP_PREPARE, "block/zram:prepare", zcomp_cpu_up_prepare, zcomp_cpu_dead); diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h index d5eef65870380..cfc8c059db636 100644 --- a/drivers/block/zram/zram_drv.h +++ b/drivers/block/zram/zram_drv.h @@ -66,7 +66,7 @@ struct zram_table_entry { unsigned long handle; unsigned long element; }; - unsigned long flags; + unsigned int flags; spinlock_t lock; #ifdef CONFIG_ZRAM_TRACK_ENTRY_ACTIME ktime_t ac_time;