From patchwork Mon Oct 17 01:20:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junjie Mao X-Patchwork-Id: 9378395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BD81600CA for ; Mon, 17 Oct 2016 02:36:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4206528C2C for ; Mon, 17 Oct 2016 02:36:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 360ED28C4E; Mon, 17 Oct 2016 02:36:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DE5428C2C for ; Mon, 17 Oct 2016 02:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932460AbcJQCgO (ORCPT ); Sun, 16 Oct 2016 22:36:14 -0400 Received: from [123.57.207.116] ([123.57.207.116]:58726 "EHLO enight.me" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932163AbcJQCgM (ORCPT ); Sun, 16 Oct 2016 22:36:12 -0400 X-Greylist: delayed 4534 seconds by postgrey-1.27 at vger.kernel.org; Sun, 16 Oct 2016 22:36:11 EDT Received: from localhost.localdomain (unknown [166.111.131.12]) by enight.me (Postfix) with ESMTPA id 64D8A8311B; Mon, 17 Oct 2016 09:20:33 +0800 (CST) From: Junjie Mao To: Chris Mason Cc: Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Junjie Mao Subject: [PATCH] btrfs: assign error values to the correct bio structs Date: Mon, 17 Oct 2016 09:20:25 +0800 Message-Id: <1476667225-7833-1-git-send-email-junjie.mao@enight.me> X-Mailer: git-send-email 1.9.3 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes: 4246a0b63bd8 ("block: add a bi_error field to struct bio") Signed-off-by: Junjie Mao --- fs/btrfs/compression.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index ccc70d96958d..d4d8b7e36b2f 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -698,7 +698,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ret = btrfs_map_bio(root, comp_bio, mirror_num, 0); if (ret) { - bio->bi_error = ret; + comp_bio->bi_error = ret; bio_endio(comp_bio); } @@ -728,7 +728,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ret = btrfs_map_bio(root, comp_bio, mirror_num, 0); if (ret) { - bio->bi_error = ret; + comp_bio->bi_error = ret; bio_endio(comp_bio); }