Skip to content

Commit 8fd8072

Browse files
gnoackl0kod
authored andcommitted
landlock: Remove remaining "inline" modifiers in .c files [v5.15]
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>
1 parent e2780a0 commit 8fd8072

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

security/landlock/fs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int landlock_append_fs_rule(struct landlock_ruleset *const ruleset,
193193
*
194194
* Returns NULL if no rule is found or if @dentry is negative.
195195
*/
196-
static inline const struct landlock_rule *
196+
static const struct landlock_rule *
197197
find_rule(const struct landlock_ruleset *const domain,
198198
const struct dentry *const dentry)
199199
{
@@ -565,8 +565,8 @@ static inline int check_access_path(const struct landlock_ruleset *const domain,
565565
return -EACCES;
566566
}
567567

568-
static inline int current_check_access_path(const struct path *const path,
569-
const access_mask_t access_request)
568+
static int current_check_access_path(const struct path *const path,
569+
const access_mask_t access_request)
570570
{
571571
const struct landlock_ruleset *const dom = get_current_fs_domain();
572572

security/landlock/ruleset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ int landlock_insert_rule(struct landlock_ruleset *const ruleset,
305305
return insert_rule(ruleset, id, &layers, ARRAY_SIZE(layers));
306306
}
307307

308-
static inline void get_hierarchy(struct landlock_hierarchy *const hierarchy)
308+
static void get_hierarchy(struct landlock_hierarchy *const hierarchy)
309309
{
310310
if (hierarchy)
311311
refcount_inc(&hierarchy->usage);

0 commit comments

Comments
 (0)