linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Mark Fasheh <mfasheh@suse.de>, <linux-btrfs@vger.kernel.org>
Cc: Chris Mason <clm@fb.com>
Subject: Re: [PATCH][RESEND] btrfs: clear 'ret' in btrfs_check_shared() loop
Date: Tue, 19 May 2015 16:35:07 -0400	[thread overview]
Message-ID: <555B9E7B.8070109@fb.com> (raw)
In-Reply-To: <20150519194950.GE18148@wotan.suse.de>

On 05/19/2015 03:49 PM, Mark Fasheh wrote:
> btrfs_check_shared() is leaking a return value of '1' from
> find_parent_nodes(). As a result, callers (in this case, extent_fiemap())
> are told extents are shared when they are not. This in turn broke fiemap on
> btrfs for kernels v3.18 and up.
>
> The fix is simple - we just have to clear 'ret' after we are done processing
> the results of find_parent_nodes().
>
> It wasn't clear to me at first what was happening with return values in
> btrfs_check_shared() and find_parent_nodes() - thanks to Josef for the help
> on irc. I added documentation to both functions to make things more clear
> for the next hacker who might come across them.
>
> If we could queue this up for -stable too that would be great.
>
> Signed-off-by: Mark Fasheh <mfasheh@suse.de>

Reviewed-by: Josef Bacik <jbacik@fb.com>

Thanks,

Josef

      reply	other threads:[~2015-05-19 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 19:49 [PATCH][RESEND] btrfs: clear 'ret' in btrfs_check_shared() loop Mark Fasheh
2015-05-19 20:35 ` Josef Bacik [this message]

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=555B9E7B.8070109@fb.com \
    --to=jbacik@fb.com \
    --cc=clm@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mfasheh@suse.de \
    /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).