From: xiakaixu1987@gmail.com
To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Kaixu Xia <kaixuxia@tencent.com>
Subject: [PATCH] btrfs: remove the useless value assignment in block_rsv_release_bytes
Date: Sun, 15 Nov 2020 14:39:23 +0800 [thread overview]
Message-ID: <1605422363-14947-1-git-send-email-kaixuxia@tencent.com> (raw)
From: Kaixu Xia <kaixuxia@tencent.com>
The variable qgroup_to_release is overwritten by the following if/else
statement before it is used, so this assignment is useless. Remove it.
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/btrfs/block-rsv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/btrfs/block-rsv.c b/fs/btrfs/block-rsv.c
index bc920afe23bf..8638327069b7 100644
--- a/fs/btrfs/block-rsv.c
+++ b/fs/btrfs/block-rsv.c
@@ -109,10 +109,8 @@ static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info,
u64 ret;
spin_lock(&block_rsv->lock);
- if (num_bytes == (u64)-1) {
+ if (num_bytes == (u64)-1)
num_bytes = block_rsv->size;
- qgroup_to_release = block_rsv->qgroup_rsv_size;
- }
block_rsv->size -= num_bytes;
if (block_rsv->reserved >= block_rsv->size) {
num_bytes = block_rsv->reserved - block_rsv->size;
--
2.20.0
next reply other threads:[~2020-11-15 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 6:39 xiakaixu1987 [this message]
2020-11-16 15:15 ` [PATCH] btrfs: remove the useless value assignment in block_rsv_release_bytes David Sterba
2020-11-17 3:17 ` kaixuxia
2020-11-23 17:58 ` 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=1605422363-14947-1-git-send-email-kaixuxia@tencent.com \
--to=xiakaixu1987@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=kaixuxia@tencent.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