diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-30 16:33:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-30 16:33:41 -0800 |
commit | 43c4f67c966deb1478dc9acbf66ab547287d530f (patch) | |
tree | e56086810b8781df2b8b20f547c4edc5c8539e3d /drivers | |
parent | f513581c35525bccfb0aadb55189478df1cfddba (diff) | |
parent | 5cbc198ae08d84bd416b672ad8bd1222acd0855c (diff) | |
download | linux-stable-43c4f67c966deb1478dc9acbf66ab547287d530f.tar.gz linux-stable-43c4f67c966deb1478dc9acbf66ab547287d530f.tar.bz2 linux-stable-43c4f67c966deb1478dc9acbf66ab547287d530f.zip |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"7 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: fix false-positive WARN_ON() in truncate/invalidate for hugetlb
kasan: support use-after-scope detection
kasan: update kasan_global for gcc 7
lib/debugobjects: export for use in modules
zram: fix unbalanced idr management at hot removal
thp: fix corner case of munlock() of PTE-mapped THPs
mm, thp: propagation of conditional compilation in khugepaged.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/zram/zram_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 04365b17ee67..5163c8f918cb 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1403,7 +1403,8 @@ static ssize_t hot_remove_store(struct class *class, zram = idr_find(&zram_index_idr, dev_id); if (zram) { ret = zram_remove(zram); - idr_remove(&zram_index_idr, dev_id); + if (!ret) + idr_remove(&zram_index_idr, dev_id); } else { ret = -ENODEV; } |