Here are 4 patches which are independent of one another. The first 2 just
change two more function to take btrfs_inode. Patch 3 just extends the usage of
in_range which renders offset_in_entry redundant thus removing the function.
Final patch just restructures btrfs_inc_block_group_ro to use a do{} while() loo
rather than a label-based. This doesn't introduce extra nesting so I don't know
why the label approach was chosen in the first place.Nikolay Borisov (4): btrfs: Make btrfs_replace_file_extents take btrfs_inode btrfs: Make find_desired_extent take btrfs_inode btrfs: Replace offset_in_entry with in_range btrfs: Replace opencoded while loop with proper construct fs/btrfs/block-group.c | 42 ++++++++++++++------------ fs/btrfs/ctree.h | 5 ++-- fs/btrfs/file.c | 66 ++++++++++++++++++++--------------------- fs/btrfs/inode.c | 2 +- fs/btrfs/ordered-data.c | 19 +++--------- fs/btrfs/reflink.c | 10 +++---- 6 files changed, 68 insertions(+), 76 deletions(-) -- 2.25.1
