aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/zram/zram_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/zram/zram_drv.h')
-rw-r--r--drivers/staging/zram/zram_drv.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/zram/zram_drv.h b/drivers/staging/zram/zram_drv.h
index abe5221c100d..e5cd2469b6a0 100644
--- a/drivers/staging/zram/zram_drv.h
+++ b/drivers/staging/zram/zram_drv.h
@@ -47,7 +47,7 @@ static const unsigned default_disksize_perc_ram = 25;
* Pages that compress to size greater than this are stored
* uncompressed in memory.
*/
-static const unsigned max_zpage_size = PAGE_SIZE / 4 * 3;
+static const size_t max_zpage_size = PAGE_SIZE / 4 * 3;
/*
* NOTE: max_zpage_size must be less than or equal to:
@@ -112,8 +112,8 @@ struct zram {
struct request_queue *queue;
struct gendisk *disk;
int init_done;
- /* Prevent concurrent execution of device init and reset */
- struct mutex init_lock;
+ /* Prevent concurrent execution of device init, reset and R/W request */
+ struct rw_semaphore init_lock;
/*
* This is the limit on amount of *uncompressed* worth of data
* we can store in a disk.
@@ -123,13 +123,13 @@ struct zram {
struct zram_stats stats;
};
-extern struct zram *devices;
-extern unsigned int num_devices;
+extern struct zram *zram_devices;
+extern unsigned int zram_num_devices;
#ifdef CONFIG_SYSFS
extern struct attribute_group zram_disk_attr_group;
#endif
extern int zram_init_device(struct zram *zram);
-extern void zram_reset_device(struct zram *zram);
+extern void __zram_reset_device(struct zram *zram);
#endif