From: Filipe Manana Date: Tue, 19 Aug 2025 02:16:01 +0000 (-0400) Subject: btrfs: send: make fs_path_len() inline and constify its argument X-Git-Tag: v6.12.44~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=06eb8b95cbc39909ad313ff2268da2c652436397;p=thirdparty%2Fkernel%2Fstable.git btrfs: send: make fs_path_len() inline and constify its argument [ 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 Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 361880e81dc39..41b7cbd070254 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -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; }