landlock: Remove remaining "inline" modifiers in .c files [v6.1]
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:56 +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 6.1]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/fs.c

index 8eccf170532e186b0dfe1136a65bb6dbaf1876ee..b67990e8f32f07188458f347f40e4d70e47d0a19 100644 (file)
@@ -220,7 +220,7 @@ find_rule(const struct landlock_ruleset *const domain,
  * sockfs, pipefs), but can still be reachable through
  * /proc/<pid>/fd/<file-descriptor>
  */
-static inline bool is_nouser_or_private(const struct dentry *dentry)
+static bool is_nouser_or_private(const struct dentry *dentry)
 {
        return (dentry->d_sb->s_flags & SB_NOUSER) ||
               (d_is_positive(dentry) &&
@@ -264,7 +264,7 @@ static const struct landlock_ruleset *get_current_fs_domain(void)
  *
  * @layer_masks_child2: Optional child masks.
  */
-static inline bool no_more_access(
+static bool no_more_access(
        const layer_mask_t (*const layer_masks_parent1)[LANDLOCK_NUM_ACCESS_FS],
        const layer_mask_t (*const layer_masks_child1)[LANDLOCK_NUM_ACCESS_FS],
        const bool child1_is_directory,
@@ -316,7 +316,7 @@ static inline bool no_more_access(
  *
  * Returns true if the request is allowed, false otherwise.
  */
-static inline bool
+static bool
 scope_to_request(const access_mask_t access_request,
                 layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])
 {
@@ -335,7 +335,7 @@ scope_to_request(const access_mask_t access_request,
  * Returns true if there is at least one access right different than
  * LANDLOCK_ACCESS_FS_REFER.
  */
-static inline bool
+static bool
 is_eacces(const layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS],
          const access_mask_t access_request)
 {
@@ -551,9 +551,9 @@ jump_up:
        return allowed_parent1 && allowed_parent2;
 }
 
-static inline int check_access_path(const struct landlock_ruleset *const domain,
-                                   const struct path *const path,
-                                   access_mask_t access_request)
+static int check_access_path(const struct landlock_ruleset *const domain,
+                            const struct path *const path,
+                            access_mask_t access_request)
 {
        layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {};
 
@@ -575,7 +575,7 @@ static int current_check_access_path(const struct path *const path,
        return check_access_path(dom, path, access_request);
 }
 
-static inline access_mask_t get_mode_access(const umode_t mode)
+static access_mask_t get_mode_access(const umode_t mode)
 {
        switch (mode & S_IFMT) {
        case S_IFLNK:
@@ -600,7 +600,7 @@ static inline access_mask_t get_mode_access(const umode_t mode)
        }
 }
 
-static inline access_mask_t maybe_remove(const struct dentry *const dentry)
+static access_mask_t maybe_remove(const struct dentry *const dentry)
 {
        if (d_is_negative(dentry))
                return 0;