disk-io.c (5c9d028b3b174e5cf3678a7b0c14e21e51665793) | disk-io.c (e3d039656384288bbe952413d8d404b3035fe7d7) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 4207 unchanged lines hidden (view full) --- 4216 4217 mutex_lock(&head->mutex); 4218 mutex_unlock(&head->mutex); 4219 btrfs_put_delayed_ref_head(head); 4220 spin_lock(&delayed_refs->lock); 4221 continue; 4222 } 4223 spin_lock(&head->lock); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/fs.h> 7#include <linux/blkdev.h> 8#include <linux/radix-tree.h> --- 4207 unchanged lines hidden (view full) --- 4216 4217 mutex_lock(&head->mutex); 4218 mutex_unlock(&head->mutex); 4219 btrfs_put_delayed_ref_head(head); 4220 spin_lock(&delayed_refs->lock); 4221 continue; 4222 } 4223 spin_lock(&head->lock); |
4224 while ((n = rb_first(&head->ref_tree)) != NULL) { | 4224 while ((n = rb_first_cached(&head->ref_tree)) != NULL) { |
4225 ref = rb_entry(n, struct btrfs_delayed_ref_node, 4226 ref_node); 4227 ref->in_tree = 0; | 4225 ref = rb_entry(n, struct btrfs_delayed_ref_node, 4226 ref_node); 4227 ref->in_tree = 0; |
4228 rb_erase(&ref->ref_node, &head->ref_tree); | 4228 rb_erase_cached(&ref->ref_node, &head->ref_tree); |
4229 RB_CLEAR_NODE(&ref->ref_node); 4230 if (!list_empty(&ref->add_list)) 4231 list_del(&ref->add_list); 4232 atomic_dec(&delayed_refs->num_entries); 4233 btrfs_put_delayed_ref(ref); 4234 } 4235 if (head->must_insert_reserved) 4236 pin_bytes = true; --- 294 unchanged lines hidden --- | 4229 RB_CLEAR_NODE(&ref->ref_node); 4230 if (!list_empty(&ref->add_list)) 4231 list_del(&ref->add_list); 4232 atomic_dec(&delayed_refs->num_entries); 4233 btrfs_put_delayed_ref(ref); 4234 } 4235 if (head->must_insert_reserved) 4236 pin_bytes = true; --- 294 unchanged lines hidden --- |