linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Cleanup btrfs_destroy_delayed_refs()
Date: Thu, 18 Apr 2019 17:49:13 +0200	[thread overview]
Message-ID: <20190418154913.GO20156@twin.jikos.cz> (raw)
In-Reply-To: <20190416055739.25771-1-wqu@suse.com>

On Tue, Apr 16, 2019 at 01:57:39PM +0800, Qu Wenruo wrote:
> This patches cleans up btrfs_destroy_delayed_refs() by:
> - Remove the forward declaration
>   The caller comes after the implementation, no need to do forward
>   declaration.

Ok.

> - Remove the @fs_info parameter
>   @fs_info can be extracted from @trans parameter.

Ok.

> - Make it return void
>   Again, no failure pattern.

When switching a fuction to return void, please check the whole
callgraph for functions that do not properly handler errors and do
BUG_ON. You won't see errors passed from them so this gives the
impression no error handling is needed in the caller.

This has been sent in the past, so I can point you to the 2nd paragraph in
https://lore.kernel.org/linux-btrfs/20180815124425.GM24025@twin.jikos.cz/

hint: btrfs_pin_extent

      parent reply	other threads:[~2019-04-18 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16  5:57 [PATCH] btrfs: Cleanup btrfs_destroy_delayed_refs() Qu Wenruo
2019-04-16  6:13 ` Nikolay Borisov
2019-04-18 15:49 ` David Sterba [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=20190418154913.GO20156@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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 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).