diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-03 09:22:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-03 09:22:00 -0700 |
commit | 5170a3b24a9141e2349a3420448743b7c68f2223 (patch) | |
tree | f88f5f1cb303a5983013154f7713972408ace60e /drivers | |
parent | e55a379827ed02c4982250fc815fed47def53a45 (diff) | |
parent | 66d2f4d28cd030220e7ea2a628993fcabcb956d1 (diff) |
Merge branch 'akpm' (patches from Andrew Morton)
Merge fixes from Andrew Morton:
"14 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
shmem: fix init_page_accessed use to stop !PageLRU bug
kernel/printk/printk.c: revert "printk: enable interrupts before calling console_trylock_for_printk()"
tools/testing/selftests/ipc/msgque.c: improve error handling when not running as root
fs/seq_file: fallback to vmalloc allocation
/proc/stat: convert to single_open_size()
hwpoison: fix the handling path of the victimized page frame that belong to non-LRU
mm:vmscan: update the trace-vmscan-postprocess.pl for event vmscan/mm_vmscan_lru_isolate
msync: fix incorrect fstart calculation
zram: revalidate disk after capacity change
tools: memory-hotplug fix unexpected operator error
tools: cpu-hotplug fix unexpected operator error
autofs4: fix false positive compile error
slub: fix off by one in number of slab tests
mm: page_alloc: fix CMA area initialisation when pageblock > MAX_ORDER
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/zram/zram_drv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 48eccb35018..089e72cd37b 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -622,8 +622,10 @@ static void zram_reset_device(struct zram *zram, bool reset_capacity) memset(&zram->stats, 0, sizeof(zram->stats)); zram->disksize = 0; - if (reset_capacity) + if (reset_capacity) { set_capacity(zram->disk, 0); + revalidate_disk(zram->disk); + } up_write(&zram->init_lock); } @@ -664,6 +666,7 @@ static ssize_t disksize_store(struct device *dev, zram->comp = comp; zram->disksize = disksize; set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); + revalidate_disk(zram->disk); up_write(&zram->init_lock); return len; |