diff mbox series

[05/12] btrfs: constify arguments of compare_inode_defrag()

Message ID 0dd124f30b6dc7dc1a90f64ae501a7ced0afb9ec.1724795624.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Renames and defrag cleanups | expand

Commit Message

David Sterba Aug. 27, 2024, 9:55 p.m. UTC
A comparator function does not change its parameters, make them const.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/defrag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c
index e2949f630584..e4bb5a8651f3 100644
--- a/fs/btrfs/defrag.c
+++ b/fs/btrfs/defrag.c
@@ -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;