landlock: Remove remaining "inline" modifiers in .c files [v5.15]
authorGünther Noack <gnoack@google.com>
Fri, 8 Dec 2023 15:51:13 +0000 (16:51 +0100)
committerMickaël Salaün <mic@digikod.net>
Wed, 3 Jan 2024 11:07:52 +0000 (12:07 +0100)
For module-internal static functions, compilers are already in a good
position to decide whether to inline them or not.

Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20231208155121.1943775-2-gnoack@google.com
[mic: Split patch for Linux 5.15]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/fs.c
security/landlock/ruleset.c

index bc7c126deea2f77428e8df76ba2132259557964c..8eccf170532e186b0dfe1136a65bb6dbaf1876ee 100644 (file)
@@ -193,7 +193,7 @@ int landlock_append_fs_rule(struct landlock_ruleset *const ruleset,
  *
  * Returns NULL if no rule is found or if @dentry is negative.
  */
-static inline const struct landlock_rule *
+static const struct landlock_rule *
 find_rule(const struct landlock_ruleset *const domain,
          const struct dentry *const dentry)
 {
@@ -565,8 +565,8 @@ static inline int check_access_path(const struct landlock_ruleset *const domain,
        return -EACCES;
 }
 
-static inline int current_check_access_path(const struct path *const path,
-                                           const access_mask_t access_request)
+static int current_check_access_path(const struct path *const path,
+                                    const access_mask_t access_request)
 {
        const struct landlock_ruleset *const dom = get_current_fs_domain();
 
index ffedc99f2b68110dffc5918fa054ef7a47de46a5..789c81b26a50482769bb77dd5c1ba73aee4b23d7 100644 (file)
@@ -305,7 +305,7 @@ int landlock_insert_rule(struct landlock_ruleset *const ruleset,
        return insert_rule(ruleset, id, &layers, ARRAY_SIZE(layers));
 }
 
-static inline void get_hierarchy(struct landlock_hierarchy *const hierarchy)
+static void get_hierarchy(struct landlock_hierarchy *const hierarchy)
 {
        if (hierarchy)
                refcount_inc(&hierarchy->usage);