]> git.baikalelectronics.ru Git - kernel.git/commit
fs: introduce fsuidgid_has_mapping() helper
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 20 Mar 2021 12:26:23 +0000 (13:26 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 23 Mar 2021 10:15:24 +0000 (11:15 +0100)
commit2104dc00ce2ceca48866a460a9ed0b8b7b8178b3
tree07ed2f940b4e014d3812c7442be01db10fd655c0
parent883d36aeab3969d981b0acb6f6b35582f8d07b30
fs: introduce fsuidgid_has_mapping() helper

Don't open-code the checks and instead move them into a clean little
helper we can call. This also reduces the risk that if we ever change
something we forget to change all locations.

Link: https://lore.kernel.org/r/20210320122623.599086-4-christian.brauner@ubuntu.com
Inspired-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
fs/namei.c
include/linux/fs.h