Skip to content

Commit da27908

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

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • security/landlock

security/landlock/fs.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ find_rule(const struct landlock_ruleset *const domain,
220220
* sockfs, pipefs), but can still be reachable through
221221
* /proc/<pid>/fd/<file-descriptor>
222222
*/
223-
static inline bool is_nouser_or_private(const struct dentry *dentry)
223+
static bool is_nouser_or_private(const struct dentry *dentry)
224224
{
225225
return (dentry->d_sb->s_flags & SB_NOUSER) ||
226226
(d_is_positive(dentry) &&
@@ -264,7 +264,7 @@ static const struct landlock_ruleset *get_current_fs_domain(void)
264264
*
265265
* @layer_masks_child2: Optional child masks.
266266
*/
267-
static inline bool no_more_access(
267+
static bool no_more_access(
268268
const layer_mask_t (*const layer_masks_parent1)[LANDLOCK_NUM_ACCESS_FS],
269269
const layer_mask_t (*const layer_masks_child1)[LANDLOCK_NUM_ACCESS_FS],
270270
const bool child1_is_directory,
@@ -316,7 +316,7 @@ static inline bool no_more_access(
316316
*
317317
* Returns true if the request is allowed, false otherwise.
318318
*/
319-
static inline bool
319+
static bool
320320
scope_to_request(const access_mask_t access_request,
321321
layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])
322322
{
@@ -335,7 +335,7 @@ scope_to_request(const access_mask_t access_request,
335335
* Returns true if there is at least one access right different than
336336
* LANDLOCK_ACCESS_FS_REFER.
337337
*/
338-
static inline bool
338+
static bool
339339
is_eacces(const layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS],
340340
const access_mask_t access_request)
341341
{
@@ -551,9 +551,9 @@ static bool is_access_to_paths_allowed(
551551
return allowed_parent1 && allowed_parent2;
552552
}
553553

554-
static inline int check_access_path(const struct landlock_ruleset *const domain,
555-
const struct path *const path,
556-
access_mask_t access_request)
554+
static int check_access_path(const struct landlock_ruleset *const domain,
555+
const struct path *const path,
556+
access_mask_t access_request)
557557
{
558558
layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {};
559559

@@ -575,7 +575,7 @@ static int current_check_access_path(const struct path *const path,
575575
return check_access_path(dom, path, access_request);
576576
}
577577

578-
static inline access_mask_t get_mode_access(const umode_t mode)
578+
static access_mask_t get_mode_access(const umode_t mode)
579579
{
580580
switch (mode & S_IFMT) {
581581
case S_IFLNK:
@@ -600,7 +600,7 @@ static inline access_mask_t get_mode_access(const umode_t mode)
600600
}
601601
}
602602

603-
static inline access_mask_t maybe_remove(const struct dentry *const dentry)
603+
static access_mask_t maybe_remove(const struct dentry *const dentry)
604604
{
605605
if (d_is_negative(dentry))
606606
return 0;

0 commit comments

Comments
 (0)