From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 8/9] btrfs: remove do_list variable at btrfs_set_delalloc_extent()
Date: Fri, 9 Feb 2024 18:00:50 +0000 [thread overview]
Message-ID: <f8cf816e7c4d397c41bb2872ef75cd1fa7bdfd44.1707491248.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1707491248.git.fdmanana@suse.com>
From: Filipe Manana <fdmanana@suse.com>
The "do_list" variable is only used once, plus its name/meaning is a bit
confusing, so remove it and directory use btrfs_is_free_space_inode().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
fs/btrfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index fe962a6045fd..17b6ab71584a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2462,7 +2462,6 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
u64 len = state->end + 1 - state->start;
u64 prev_delalloc_bytes;
u32 num_extents = count_max_extents(fs_info, len);
- bool do_list = !btrfs_is_free_space_inode(inode);
spin_lock(&inode->lock);
btrfs_mod_outstanding_extents(inode, num_extents);
@@ -2487,7 +2486,7 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
* and are therefore protected against concurrent calls of this
* function and btrfs_clear_delalloc_extent().
*/
- if (do_list && prev_delalloc_bytes == 0)
+ if (!btrfs_is_free_space_inode(inode) && prev_delalloc_bytes == 0)
btrfs_add_delalloc_inode(inode);
}
--
2.40.1
next prev parent reply other threads:[~2024-02-09 18:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 18:00 [PATCH 0/9] btrfs: cleanups and minor performance change to setting/clearing delalloc fdmanana
2024-02-09 18:00 ` [PATCH 1/9] btrfs: stop passing root argument to btrfs_add_delalloc_inodes() fdmanana
2024-02-10 7:45 ` Qu Wenruo
2024-02-09 18:00 ` [PATCH 2/9] btrfs: stop passing root argument to __btrfs_del_delalloc_inode() fdmanana
2024-02-10 7:45 ` Qu Wenruo
2024-02-09 18:00 ` [PATCH 3/9] btrfs: assert root delalloc lock is held at __btrfs_del_delalloc_inode() fdmanana
2024-02-10 7:46 ` Qu Wenruo
2024-02-09 18:00 ` [PATCH 4/9] btrfs: rename btrfs_add_delalloc_inodes() to singular form fdmanana
2024-02-10 7:46 ` Qu Wenruo
2024-02-09 18:00 ` [PATCH 5/9] btrfs: reduce inode lock critical section when setting and clearing delalloc fdmanana
2024-02-09 18:00 ` [PATCH 6/9] btrfs: add lockdep assertion to remaining delalloc callbacks fdmanana
2024-02-10 7:48 ` Qu Wenruo
2024-02-09 18:00 ` [PATCH 7/9] btrfs: use assertion instead of BUG_ON when adding/removing to delalloc list fdmanana
2024-02-10 7:48 ` Qu Wenruo
2024-02-09 18:00 ` fdmanana [this message]
2024-02-10 7:49 ` [PATCH 8/9] btrfs: remove do_list variable at btrfs_set_delalloc_extent() Qu Wenruo
2024-02-09 18:00 ` [PATCH 9/9] btrfs: remove do_list variable at btrfs_clear_delalloc_extent() fdmanana
2024-02-10 7:49 ` Qu Wenruo
2024-02-09 21:54 ` [PATCH 0/9] btrfs: cleanups and minor performance change to setting/clearing delalloc Boris Burkov
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=f8cf816e7c4d397c41bb2872ef75cd1fa7bdfd44.1707491248.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@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