diff options
author | Christian Brauner <brauner@kernel.org> | 2022-06-29 12:25:53 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-06-29 12:26:48 +0200 |
commit | 9adf24a40978c19f57f44572b292b38938da7686 (patch) | |
tree | b7d7b6a4190a33e52a47fc4b2546a038ed72caf0 /include/linux/fs.h | |
parent | 4d0548a7b806a78ba253f1389b9ecdcaca47d583 (diff) | |
download | lwn-9adf24a40978c19f57f44572b292b38938da7686.tar.gz lwn-9adf24a40978c19f57f44572b292b38938da7686.zip |
fs: port HAS_UNMAPPED_ID() to vfs{g,u}id_t
The HAS_UNMAPPED_ID() helper is fully self contained so we can port it
to vfs{g,u}id_t without much effort.
Cc: Seth Forshee <sforshee@digitalocean.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index d6e3347cbf69..ec2e35886779 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2323,8 +2323,8 @@ static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags static inline bool HAS_UNMAPPED_ID(struct user_namespace *mnt_userns, struct inode *inode) { - return !uid_valid(i_uid_into_mnt(mnt_userns, inode)) || - !gid_valid(i_gid_into_mnt(mnt_userns, inode)); + return !vfsuid_valid(i_uid_into_vfsuid(mnt_userns, inode)) || + !vfsgid_valid(i_gid_into_vfsgid(mnt_userns, inode)); } static inline int iocb_flags(struct file *file); |