]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: send: make fs_path_len() inline and constify its argument
authorFilipe Manana <fdmanana@suse.com>
Tue, 19 Aug 2025 02:16:01 +0000 (22:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:31:04 +0000 (16:31 +0200)
[ Upstream commit 920e8ee2bfcaf886fd8c0ad9df097a7dddfeb2d8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/send.c

index 361880e81dc39ee062093daf0f8893b8d4f308bc..41b7cbd070254884085b2709aff183c104f56b4f 100644 (file)
@@ -478,7 +478,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;
 }