From patchwork Wed Dec 12 07:42:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10725637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99E956C5 for ; Wed, 12 Dec 2018 07:42:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CE782AA9D for ; Wed, 12 Dec 2018 07:42:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 814842AC1A; Wed, 12 Dec 2018 07:42:41 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 403652AA9D for ; Wed, 12 Dec 2018 07:42:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbeLLHmj (ORCPT ); Wed, 12 Dec 2018 02:42:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:40910 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726603AbeLLHmi (ORCPT ); Wed, 12 Dec 2018 02:42:38 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E5068AEFA for ; Wed, 12 Dec 2018 07:42:36 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 3/3] btrfs: Remove redundant assignment Date: Wed, 12 Dec 2018 09:42:34 +0200 Message-Id: <20181212074234.20613-4-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181212074234.20613-1-nborisov@suse.com> References: <20181212074234.20613-1-nborisov@suse.com> 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 hole_len is only used if the hole falls within the requested range. Make that explicitly clear by only assigning in the corresponding branch. Signed-off-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 95eb18779c19..73ae4428d0df 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7021,7 +7021,7 @@ struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode, if (delalloc_len) { u64 hole_start; - u64 hole_len = len; + u64 hole_len; u64 hole_end = extent_map_end(hole_em); em = alloc_extent_map();