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 <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20250110153918.241810-2-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
1 parent 4944029 commit 25ccc75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • security/landlock

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)