From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: [merged] zram-fix-error-return-codes-not-being-returned-in-writeback_store.patch removed from -mm tree Date: Fri, 31 Jan 2020 15:19:40 -0800 Message-ID: <20200131231940.PoBYsYeLG%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:51358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726347AbgAaXTl (ORCPT ); Fri, 31 Jan 2020 18:19:41 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: axboe@kernel.dk, colin.king@canonical.com, minchan@kernel.org, mm-commits@vger.kernel.org, sergey.senozhatsky@gmail.com The patch titled Subject: drivers/block/zram/zram_drv.c: fix error return codes not being returned in writeback_store has been removed from the -mm tree. Its filename was zram-fix-error-return-codes-not-being-returned-in-writeback_store.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Colin Ian King Subject: drivers/block/zram/zram_drv.c: fix error return codes not being returned in writeback_store Currently when an error code -EIO or -ENOSPC in the for-loop of writeback_store the error code is being overwritten by a ret = len assignment at the end of the function and the error codes are being lost. Fix this by assigning ret = len at the start of the function and remove the assignment from the end, hence allowing ret to be preserved when error codes are assigned to it. Addresses Coverity ("Unused value") Link: http://lkml.kernel.org/r/20191128122958.178290-1-colin.king@canonical.com Fixes: a939888ec38b ("zram: support idle/huge page writeback") Signed-off-by: Colin Ian King Acked-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton --- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/block/zram/zram_drv.c~zram-fix-error-return-codes-not-being-returned-in-writeback_store +++ a/drivers/block/zram/zram_drv.c @@ -629,7 +629,7 @@ static ssize_t writeback_store(struct de struct bio bio; struct bio_vec bio_vec; struct page *page; - ssize_t ret; + ssize_t ret = len; int mode; unsigned long blk_idx = 0; @@ -765,7 +765,6 @@ next: if (blk_idx) free_block_bdev(zram, blk_idx); - ret = len; __free_page(page); release_init_lock: up_read(&zram->init_lock); _ Patches currently in -mm which might be from colin.king@canonical.com are