linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 3/3] btrfs: Remove redundant assignment
Date: Wed, 12 Dec 2018 09:42:34 +0200	[thread overview]
Message-ID: <20181212074234.20613-4-nborisov@suse.com> (raw)
In-Reply-To: <20181212074234.20613-1-nborisov@suse.com>

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 <nborisov@suse.com>
---
 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();
-- 
2.17.1


  parent reply	other threads:[~2018-12-12  7:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  7:42 [PATCH 0/3] Cleanups around btrfs_get_extent_fiemap Nikolay Borisov
2018-12-12  7:42 ` [PATCH 1/3] btrfs: Remove unused arguments from btrfs_get_extent_fiemap Nikolay Borisov
2018-12-12  9:14   ` Johannes Thumshirn
2018-12-12  7:42 ` [PATCH 2/3] btrfs: Refactor btrfs_get_extent_fiemap Nikolay Borisov
2019-01-04 14:59   ` David Sterba
2018-12-12  7:42 ` Nikolay Borisov [this message]
2018-12-12  9:28   ` [PATCH 3/3] btrfs: Remove redundant assignment Johannes Thumshirn
2019-01-04 15:01 ` [PATCH 0/3] Cleanups around btrfs_get_extent_fiemap David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181212074234.20613-4-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).