Skip to content

Commit 25ccc75

Browse files
committed
landlock: Constify get_mode_access()
Use __attribute_const__ for get_mode_access(). Reviewed-by: Günther Noack <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mickaël Salaün <[email protected]>
1 parent 4944029 commit 25ccc75

File tree

1 file changed

+1
-1
lines changed
  • security/landlock

1 file changed

+1
-1
lines changed

security/landlock/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ static int current_check_access_path(const struct path *const path,
932932
return check_access_path(dom, path, access_request);
933933
}
934934

935-
static access_mask_t get_mode_access(const umode_t mode)
935+
static __attribute_const__ access_mask_t get_mode_access(const umode_t mode)
936936
{
937937
switch (mode & S_IFMT) {
938938
case S_IFLNK:

0 commit comments

Comments
 (0)