From: Filipe Manana Date: Thu, 13 Nov 2025 12:07:14 +0000 (+0000) Subject: btrfs: update check_skip variable after unlocking current node X-Git-Tag: v6.19-rc1~167^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2b2504ece4089697bb7db115dc91e344dfed76f;p=thirdparty%2Fkernel%2Flinux.git btrfs: update check_skip variable after unlocking current node There's no need to update the local variable 'check_skip' to false inside the critical section delimited by the lock of the current node, so do it after unlocking the node. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 8b54daf3d0e71..46262939e873c 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1435,8 +1435,8 @@ static noinline void unlock_up(struct btrfs_path *path, int level, } if (i >= lowest_unlock && i > skip_level) { - check_skip = false; btrfs_tree_unlock_rw(path->nodes[i], path->locks[i]); + check_skip = false; path->locks[i] = 0; if (write_lock_level && i > min_write_lock_level &&