linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK
@ 2020-01-20  3:41 Yue Hu
  2020-01-20  5:30 ` Sergey Senozhatsky
  2020-01-23  1:54 ` Minchan Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Hu @ 2020-01-20  3:41 UTC (permalink / raw)
  To: minchan, ngupta, sergey.senozhatsky.work; +Cc: linux-kernel, huyue2

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>
---
 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 f2fd46d..1cb3b9a 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -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;
-- 
1.9.1


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

* Re: [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK
  2020-01-20  3:41 [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK Yue Hu
@ 2020-01-20  5:30 ` Sergey Senozhatsky
  2020-01-23  1:54 ` Minchan Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2020-01-20  5:30 UTC (permalink / raw)
  To: Yue Hu; +Cc: minchan, ngupta, sergey.senozhatsky.work, linux-kernel, huyue2

On (20/01/20 11:41), Yue Hu wrote:
> 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>

Looks good to me

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

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

* Re: [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK
  2020-01-20  3:41 [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK Yue Hu
  2020-01-20  5:30 ` Sergey Senozhatsky
@ 2020-01-23  1:54 ` Minchan Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Minchan Kim @ 2020-01-23  1:54 UTC (permalink / raw)
  To: Yue Hu; +Cc: ngupta, sergey.senozhatsky.work, linux-kernel, huyue2

On Mon, Jan 20, 2020 at 11:41:55AM +0800, Yue Hu wrote:
> 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>
Acked-by: Minchan Kim <minchan@kernel.org>

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

end of thread, other threads:[~2020-01-23  1:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20  3:41 [PATCH] zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK Yue Hu
2020-01-20  5:30 ` Sergey Senozhatsky
2020-01-23  1:54 ` 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).