linux/drivers/staging/zram
Jerome Marchand 0900beae17 staging: zram: fix zram locking
Currently init_lock only prevents concurrent execution of zram_init_device()
and zram_reset_device() but not zram_make_request() nor sysfs store functions.

This patch changes init_lock into a rw_semaphore. A write lock is taken by
init, reset and store functions, a read lock is taken by zram_make_request().
Also, avoids to release the lock before calling __zram_reset_device() for
cleaning after a failed init, thus preventing any concurrent task to see an
inconsistent state of zram.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:56:15 -07:00
..
Kconfig staging: Allow sharing xvmalloc for zram and zcache 2011-02-23 14:02:56 -08:00
Makefile staging: Allow sharing xvmalloc for zram and zcache 2011-02-23 14:02:56 -08:00
xvmalloc_int.h zram/xvmalloc: Close 32byte hole on 64bit CPUs 2011-02-04 13:29:11 -08:00
xvmalloc.c staging: Allow sharing xvmalloc for zram and zcache 2011-02-23 14:02:56 -08:00
xvmalloc.h
zram_drv.c staging: zram: fix zram locking 2011-09-06 16:56:15 -07:00
zram_drv.h staging: zram: fix zram locking 2011-09-06 16:56:15 -07:00
zram_sysfs.c staging: zram: fix zram locking 2011-09-06 16:56:15 -07:00
zram.txt