[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250208151347.89708-1-david.laight.linux@gmail.com>
Date: Sat, 8 Feb 2025 15:13:47 +0000
From: David Laight <david.laight.linux@...il.com>
To: Al Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Laight <david.laight.linux@...il.com>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>
Subject: [PATCH next 1/1] fs: Mark get_sigset_argpack() __always_inline
Since the function is 'hot enough' to worry about avoiding the
overhead of copy_from_user() it must be worth forcing it to be
inlined.
Signed-off-by: David Laight <david.laight.linux@...il.com>
---
I'd guess that gcc is counting up the number of lines in the asm again.
I'm not sure how to handle the indentation of the continuation lines.
Lining up with the ( gives overlong lines.
Elsewhere in this file one, two or four tabs are used.
I picked two tabs - one of my favourite schemes.
fs/select.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index 7da531b1cf6b..9d508114add1 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -771,8 +771,8 @@ struct sigset_argpack {
size_t size;
};
-static inline int get_sigset_argpack(struct sigset_argpack *to,
- struct sigset_argpack __user *from)
+static __always_inline int get_sigset_argpack(struct sigset_argpack *to,
+ struct sigset_argpack __user *from)
{
// the path is hot enough for overhead of copy_from_user() to matter
if (from) {
@@ -1343,8 +1343,8 @@ struct compat_sigset_argpack {
compat_uptr_t p;
compat_size_t size;
};
-static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
- struct compat_sigset_argpack __user *from)
+static __always_inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
+ struct compat_sigset_argpack __user *from)
{
if (from) {
if (!user_read_access_begin(from, sizeof(*from)))
--
2.39.5
Powered by blists - more mailing lists