The patch titled Subject: zram-implement-rw_page-operation-of-zram-fix-2-cleanup has been added to the -mm tree. Its filename is zram-implement-rw_page-operation-of-zram-fix-2-cleanup.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/zram-implement-rw_page-operation-of-zram-fix-2-cleanup.patch echo and later at echo http://ozlabs.org/~akpm/mmotm/broken-out/zram-implement-rw_page-operation-of-zram-fix-2-cleanup.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Subject: zram-implement-rw_page-operation-of-zram-fix-2-cleanup code cleanup Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Karam Lee <karam.lee@xxxxxxx> Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Jerome Marchand <jmarchan@xxxxxxxxxx> Cc: Nitin Gupta <ngupta@xxxxxxxxxx> Cc: <seungho1.park@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/block/zram/zram_drv.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff -puN drivers/block/zram/zram_drv.c~zram-implement-rw_page-operation-of-zram-fix-2-cleanup drivers/block/zram/zram_drv.c --- a/drivers/block/zram/zram_drv.c~zram-implement-rw_page-operation-of-zram-fix-2-cleanup +++ a/drivers/block/zram/zram_drv.c @@ -956,8 +956,7 @@ static int zram_rw_page(struct block_dev zram = bdev->bd_disk->private_data; if (!valid_io_request(zram, sector, PAGE_SIZE)) { atomic64_inc(&zram->stats.invalid_io); - err = -EINVAL; - goto out; + return -EINVAL; } down_read(&zram->init_lock); @@ -974,15 +973,11 @@ static int zram_rw_page(struct block_dev bv.bv_offset = 0; err = zram_bvec_rw(zram, &bv, index, offset, rw); - out_unlock: up_read(&zram->init_lock); -out: - if (unlikely(err)) - return err; - - page_endio(page, rw, 0); - return 0; + if (err == 0) + page_endio(page, rw, 0); + return err; } static const struct block_device_operations zram_devops = { _ Patches currently in -mm which might be from sergey.senozhatsky@xxxxxxxxx are zsmalloc-merge-size_class-to-reduce-fragmentation.patch zram-implement-rw_page-operation-of-zram-fix-2.patch zram-implement-rw_page-operation-of-zram-fix-2-cleanup.patch zsmalloc-fix-zs_init-cpu-notifier-error-handling.patch zsmalloc-fix-zs_init-cpu-notifier-error-handling-fix-2.patch zsmalloc-fix-zs_init-cpu-notifier-error-handling-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html