From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Filipe Manana <fdmanana@suse.com>,
David Sterba <dsterba@suse.com>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.12.y 7/7] btrfs: send: make fs_path_len() inline and constify its argument
Date: Mon, 18 Aug 2025 22:16:01 -0400 [thread overview]
Message-ID: <20250819021601.274993-7-sashal@kernel.org> (raw)
In-Reply-To: <20250819021601.274993-1-sashal@kernel.org>
From: Filipe Manana <fdmanana@suse.com>
[ 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>
---
fs/btrfs/send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 361880e81dc3..41b7cbd07025 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;
}
--
2.50.1
next prev parent reply other threads:[~2025-08-19 2:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 10:57 FAILED: patch "[PATCH] btrfs: send: use fallocate for hole punching with send stream" failed to apply to 6.12-stable tree gregkh
2025-08-19 2:15 ` [PATCH 6.12.y 1/7] btrfs: send: factor out common logic when sending xattrs Sasha Levin
2025-08-19 2:15 ` [PATCH 6.12.y 2/7] btrfs: send: only use boolean variables at process_recorded_refs() Sasha Levin
2025-08-19 2:15 ` [PATCH 6.12.y 3/7] btrfs: send: add and use helper to rename current inode when processing refs Sasha Levin
2025-08-19 2:15 ` [PATCH 6.12.y 4/7] btrfs: send: keep the current inode's path cached Sasha Levin
2025-08-19 2:15 ` [PATCH 6.12.y 5/7] btrfs: send: avoid path allocation for the current inode when issuing commands Sasha Levin
2025-08-19 2:16 ` [PATCH 6.12.y 6/7] btrfs: send: use fallocate for hole punching with send stream v2 Sasha Levin
2025-08-19 2:16 ` Sasha Levin [this message]
2025-08-19 12:17 ` [PATCH 6.12.y 7/7] btrfs: send: make fs_path_len() inline and constify its argument David Sterba
2025-08-19 14:35 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819021601.274993-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.