lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] zram: correct flag name of ZRAM_ACCESS
Date
ZRAM_ACCESS is meant to lock a slot of zram so correct the name.

Signed-off-by: Minchan Kim <minchan@kernel.org>
---
drivers/block/zram/zram_drv.c | 4 ++--
drivers/block/zram/zram_drv.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 0f3fadd71230..4feb983ec9a3 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -755,12 +755,12 @@ static DEVICE_ATTR_RO(debug_stat);

static void zram_slot_lock(struct zram *zram, u32 index)
{
- bit_spin_lock(ZRAM_ACCESS, &zram->table[index].value);
+ bit_spin_lock(ZRAM_LOCK, &zram->table[index].value);
}

static void zram_slot_unlock(struct zram *zram, u32 index)
{
- bit_spin_unlock(ZRAM_ACCESS, &zram->table[index].value);
+ bit_spin_unlock(ZRAM_LOCK, &zram->table[index].value);
}

static void zram_meta_free(struct zram *zram, u64 disksize)
diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
index d71c8000a964..baecba5d56a5 100644
--- a/drivers/block/zram/zram_drv.h
+++ b/drivers/block/zram/zram_drv.h
@@ -46,7 +46,7 @@
enum zram_pageflags {
/* Page consists the same element */
ZRAM_SAME = ZRAM_FLAG_SHIFT,
- ZRAM_ACCESS, /* page is now accessed */
+ ZRAM_LOCK, /* zram slot is locked */
ZRAM_WB, /* page is stored on backing_device */

__NR_ZRAM_PAGEFLAGS,
--
2.17.0.rc0.231.g781580f067-goog
\
 
 \ /
  Last update: 2018-03-26 08:50    [W:0.067 / U:9.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site