Skip to contentSkip to conversation

zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK

PATCH In review Yue Hu 3 participants 3 messages Jan 20, 2020 – Jan 23, 2020

Subsystems (2)
lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH 1/1 zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK

From: Yue Hu <[email protected]>

backing_dev is never used when not enable CONFIG_ZRAM_WRITEBACK and it's introduced from writeback feature. So it's needless also affect readability in that case.

---
 drivers/block/zram/zram_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/zram/zram_drv.h +1 -1
index f2fd46d..1cb3b9a 100644
@@ -112,8 +112,8 @@ struct zram {
 	 * zram is claimed so open request will be failed
 	 */
 	bool claim; /* Protected by bdev->bd_mutex */
-	struct file *backing_dev;
 #ifdef CONFIG_ZRAM_WRITEBACK
+	struct file *backing_dev;
 	spinlock_t wb_limit_lock;
 	bool wb_limit_enable;
 	u64 bd_wb_limit;
Signature · 1 line
1.9.1