Skip to content

Commit

Permalink
btrfs: constify arguments of compare_inode_defrag()
Browse files Browse the repository at this point in the history
A comparator function does not change its parameters, make them const.

Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Sep 10, 2024
1 parent a92914a commit b7164d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/defrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ struct inode_defrag {
u32 extent_thresh;
};

static int compare_inode_defrag(struct inode_defrag *defrag1,
struct inode_defrag *defrag2)
static int compare_inode_defrag(const struct inode_defrag *defrag1,
const struct inode_defrag *defrag2)
{
if (defrag1->root > defrag2->root)
return 1;
Expand Down

0 comments on commit b7164d9

Please sign in to comment.