btrfs: use rb_entry_safe() where possible to simplify code

Simplify conditionally reading an rb_entry(), there's the
rb_entry_safe() helper that checks the node pointer for NULL so we don't
have to write it explicitly.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2025-03-27 17:19:18 +01:00
commit 6aa79c4f25
5 changed files with 15 additions and 42 deletions