public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <guo.ziliang@zte.com.cn>
To: <clm@fb.com>, <josef@toxicpanda.com>
Cc: <dsterba@suse.com>, <linux-btrfs@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <guo.ziliang@zte.com.cn>
Subject: [PATCH linux-next] btrfs: remove redundant ret variable in delete_v1_space_cache
Date: Tue, 15 Nov 2022 09:14:56 +0800 (CST)	[thread overview]
Message-ID: <202211150914564821972@zte.com.cn> (raw)

From: guo ziliang <guo.ziliang@zte.com.cn>
Return value from delete_block_group_cache() directly instead of taking
this in another redundant variable.

Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn>
---
 fs/btrfs/relocation.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 56c8afa..d7f76cf 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3374,7 +3374,6 @@ static int delete_v1_space_cache(struct extent_buffer *leaf,
        struct btrfs_key key;
        bool found = false;
        int i;
-       int ret;

        if (btrfs_header_owner(leaf) != BTRFS_ROOT_TREE_OBJECTID)
                return 0;
@@ -3398,9 +3397,8 @@ static int delete_v1_space_cache(struct extent_buffer *leaf,
        }
        if (!found)
                return -ENOENT;
-       ret = delete_block_group_cache(leaf->fs_info, block_group, NULL,
+       return delete_block_group_cache(leaf->fs_info, block_group, NULL,
                                        space_cache_ino);
-       return ret;
 }

 /*
--
1.8.3.1

             reply	other threads:[~2022-11-15  1:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15  1:14 guo.ziliang [this message]
2022-11-15 13:11 ` [PATCH linux-next] btrfs: remove redundant ret variable in delete_v1_space_cache 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=202211150914564821972@zte.com.cn \
    --to=guo.ziliang@zte.com.cn \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@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