f2fs: port to vfs{g, u}id_t and associated helpers
PATCH 1/1 f2fs: port to vfs{g, u}id_t and associated helpers
A while ago we introduced a dedicated vfs{g,u}id_t type in commit 1e5267cd0895 ("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t.
--- fs/f2fs/acl.c | 2 +- fs/f2fs/file.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
fs/f2fs/acl.c +1 -1
@@ -219,7 +219,7 @@ static int f2fs_acl_update_mode(struct user_namespace *mnt_userns,return error;if (error ==0 ) *acl =NULL ; -if (!in_group_p (i_gid_into_mnt (mnt_userns, inode)) && +if (!vfsgid_in_group_p (i_gid_into_vfsgid (mnt_userns, inode)) && !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) mode &= ~S_ISGID ; *mode_p = mode;
fs/f2fs/file.c +3 -2
@@ -871,9 +871,10 @@ static void __setattr_copy(struct user_namespace *mnt_userns, inode->i_ctime = attr->ia_ctime;if (ia_valid &ATTR_MODE ) {umode_t mode = attr->ia_mode; -kgid_t kgid =i_gid_into_mnt (mnt_userns, inode); +vfsgid_t vfsgid =i_gid_into_vfsgid (mnt_userns, inode); -if (!in_group_p (kgid) && !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) +if (!vfsgid_in_group_p (vfsgid) && + !capable_wrt_inode_uidgid (mnt_userns, inode,CAP_FSETID )) mode &= ~S_ISGID ;set_acl_inode (inode, mode); }
base-commit: 7e18e42e4b280c85b76967a9106a13ca61c16179
Signature · 8 lines
2.34.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Quoted 6 lines · Christian Brauner
A while ago we introduced a dedicated vfs{g,u}id_t type in commit
1e5267cd0895("mnt_idmapping: add vfs{g,u}id_t"). We already switched over a good part of the VFS. Ultimately we will remove all legacy idmapped mount helpers that operate only on k{g,u}id_t in favor of the new type safe helpers that operate on vfs{g,u}id_t.
Quoted 6 lines
Cc Seth Forshee (Digital Ocean) <[email protected]>Cc Christoph Hellwig <[email protected]>Cc Jaegeuk Kim <[email protected]>Cc Chao Yu <[email protected]>Signed-off-by Christian Brauner (Microsoft) <[email protected]>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel