linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RESEND] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK
@ 2021-05-21  6:05 Yue Hu
  2021-05-21 17:44 ` Minchan Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Yue Hu @ 2021-05-21  6:05 UTC (permalink / raw)
  To: minchan, ngupta, senozhatsky, axboe
  Cc: linux-kernel, linux-block, huyue2, zbestahu, Sergey Senozhatsky

From: Yue Hu <huyue2@yulong.com>

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.

Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
---
 drivers/block/zram/zram_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index 419a7e8..6e73dc3 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -113,8 +113,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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-21  6:05 [PATCH][RESEND] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK Yue Hu
2021-05-21 17:44 ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).