]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: send: make fs_path_len() inline and constify its argument
authorFilipe Manana <fdmanana@suse.com>
Tue, 4 Feb 2025 16:41:01 +0000 (16:41 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:44 +0000 (20:35 +0100)
The helper function fs_path_len() is trivial and doesn't need to change
its path argument, so make it inline and constify the argument.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c

index 8de561fb13902b9683c32ca016e71c539685d1a8..4e998bf8d379eaf7c589768b835d12ee01daeb99 100644 (file)
@@ -468,7 +468,7 @@ static void fs_path_free(struct fs_path *p)
        kfree(p);
 }
 
-static int fs_path_len(struct fs_path *p)
+static inline int fs_path_len(const struct fs_path *p)
 {
        return p->end - p->start;
 }