All of lore.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: linux-btrfs@vger.kernel.org
Cc: kernel-team@fb.com, David Sterba <dsterba@suse.com>,
	Jun Wu <quark@fb.com>
Subject: Re: [PATCH] Btrfs: clean up error handling in btrfs_truncate()
Date: Tue, 29 May 2018 12:24:31 -0700	[thread overview]
Message-ID: <20180529192431.GD23487@vader> (raw)
In-Reply-To: <63257e551e4ebd40d77dc0758f7bada3d38e71e9.1527008327.git.osandov@fb.com>

On Tue, May 22, 2018 at 09:59:50AM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> btrfs_truncate() uses two variables for error handling, ret and err (if
> this sounds familiar, it's because btrfs_truncate_inode_items() did
> something similar). This is error prone, as was made evident by "Btrfs:
> fix error handling in btrfs_truncate()". We only have err because we
> don't want to mask an error if we call btrfs_update_inode() and
> btrfs_end_transaction(), so let's make that its own scoped return
> variable and use ret everywhere else.
> 
> Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> This is the same as my v1 "Btrfs: fix error handling in
> btrfs_truncate()", but rebased on top of kdave/for-next + v2 of "Btrfs:
> fix error handling in btrfs_truncate()".
> 
>  fs/btrfs/inode.c | 33 ++++++++++++++-------------------
>  1 file changed, 14 insertions(+), 19 deletions(-)

Dave, what are your thoughts on this one? Are you thinking 4.18 or 4.19?

  reply	other threads:[~2018-05-29 19:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 16:59 [PATCH] Btrfs: clean up error handling in btrfs_truncate() Omar Sandoval
2018-05-29 19:24 ` Omar Sandoval [this message]
2018-05-30 19:24   ` 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=20180529192431.GD23487@vader \
    --to=osandov@osandov.com \
    --cc=dsterba@suse.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quark@fb.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.