diff options
author | Josef Bacik <josef@toxicpanda.com> | 2023-01-27 00:00:54 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-15 21:38:53 +0300 |
commit | d3fb66150c05b1b082984c88e6895e663119ac4e (patch) | |
tree | 68398aa0371467b98dc135b1d7202a3b5112dd89 | |
parent | 8e81aa16a42169faae1ba15cd648cc8bb83eaa48 (diff) | |
download | linux-d3fb66150c05b1b082984c88e6895e663119ac4e.tar.xz |
btrfs: always lock the block before calling btrfs_clean_tree_block
We want to clean up the dirty handling for extent buffers so it's a
little more consistent, so skip the check for generation == transid and
simply always lock the extent buffer before calling btrfs_clean_tree_block.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 688cdf816957..97f2c10ad654 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5469,8 +5469,7 @@ static noinline int walk_up_proc(struct btrfs_trans_handle *trans, } } /* make block locked assertion in btrfs_clean_tree_block happy */ - if (!path->locks[level] && - btrfs_header_generation(eb) == trans->transid) { + if (!path->locks[level]) { btrfs_tree_lock(eb); path->locks[level] = BTRFS_WRITE_LOCK; } |