From patchwork Fri Jun 2 16:58:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 9763069 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 B1E9060365 for ; Fri, 2 Jun 2017 16:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A416C28589 for ; Fri, 2 Jun 2017 16:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98ACD28591; Fri, 2 Jun 2017 16:59:37 +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 50E1328589 for ; Fri, 2 Jun 2017 16:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751198AbdFBQ7f (ORCPT ); Fri, 2 Jun 2017 12:59:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:34838 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751140AbdFBQ7e (ORCPT ); Fri, 2 Jun 2017 12:59:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 837C5ABB1 for ; Fri, 2 Jun 2017 16:59:33 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 43B03DA8A9; Fri, 2 Jun 2017 18:58:33 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 2/8] btrfs: btrfs_bio_alloc never fails, skip error handling Date: Fri, 2 Jun 2017 18:58:33 +0200 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: 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 Update direct callers of btrfs_bio_alloc that do error handling, that we can now remove. Signed-off-by: David Sterba Reviewed-by: Anand Jain --- fs/btrfs/extent_io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 78a787c36a35..17f80a18e787 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2807,9 +2807,6 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree, bio = btrfs_bio_alloc(bdev, sector, BIO_MAX_PAGES, GFP_NOFS | __GFP_HIGH); - if (!bio) - return -ENOMEM; - bio_add_page(bio, page, page_size, offset); bio->bi_end_io = end_io_func; bio->bi_private = tree;