summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zram
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 07:40:10 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 07:40:10 -0700
commit01731cf2eee38410b505c447026e46a591674835 (patch)
treeeeaea94786b4ca993dd3a40d123eb3b6799da1c9 /drivers/staging/zram
parent6496c045292b7afe74b5306c123186976f032125 (diff)
parent5ae90d8e467e625e447000cb4335c4db973b1095 (diff)
downloadblackbird-obmc-linux-01731cf2eee38410b505c447026e46a591674835.tar.gz
blackbird-obmc-linux-01731cf2eee38410b505c447026e46a591674835.zip
Merge 3.11-rc3 into staging-next
We want these fixes here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zram')
-rw-r--r--drivers/staging/zram/zram_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 5ef6508a587c..7ebf91d347f5 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -528,8 +528,11 @@ static void zram_reset_device(struct zram *zram)
size_t index;
struct zram_meta *meta;
- if (!zram->init_done)
+ down_write(&zram->init_lock);
+ if (!zram->init_done) {
+ up_write(&zram->init_lock);
return;
+ }
meta = zram->meta;
zram->init_done = 0;
@@ -550,6 +553,7 @@ static void zram_reset_device(struct zram *zram)
zram->disksize = 0;
set_capacity(zram->disk, 0);
+ up_write(&zram->init_lock);
}
static void zram_init_device(struct zram *zram, struct zram_meta *meta)
OpenPOWER on IntegriCloud