diff options
author | Dwight Engen <dwight.engen@oracle.com> | 2013-08-15 14:08:01 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-15 15:22:40 -0400 |
commit | 7aab1b28879d2280c9a0e50000e4ae153cfac55a (patch) | |
tree | e30dfe89a43849a9eecece13e721e89528ff13ce /fs/xfs/xfs_inode.c | |
parent | fd5e2aa8653665ae1cc60f7aca1069abdbcad3f6 (diff) |
xfs: convert kuid_t to/from uid_t for internal structures
Use uint32 from init_user_ns for xfs internal uid/gid
representation in xfs_icdinode, xfs_dqid_t.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 2f41a1a2f888..8750cdb6e512 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -690,8 +690,8 @@ xfs_ialloc( | |||
690 | ip->i_d.di_onlink = 0; | 690 | ip->i_d.di_onlink = 0; |
691 | ip->i_d.di_nlink = nlink; | 691 | ip->i_d.di_nlink = nlink; |
692 | ASSERT(ip->i_d.di_nlink == nlink); | 692 | ASSERT(ip->i_d.di_nlink == nlink); |
693 | ip->i_d.di_uid = current_fsuid(); | 693 | ip->i_d.di_uid = xfs_kuid_to_uid(current_fsuid()); |
694 | ip->i_d.di_gid = current_fsgid(); | 694 | ip->i_d.di_gid = xfs_kgid_to_gid(current_fsgid()); |
695 | xfs_set_projid(ip, prid); | 695 | xfs_set_projid(ip, prid); |
696 | memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); | 696 | memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); |
697 | 697 | ||
@@ -730,7 +730,7 @@ xfs_ialloc( | |||
730 | */ | 730 | */ |
731 | if ((irix_sgid_inherit) && | 731 | if ((irix_sgid_inherit) && |
732 | (ip->i_d.di_mode & S_ISGID) && | 732 | (ip->i_d.di_mode & S_ISGID) && |
733 | (!in_group_p((gid_t)ip->i_d.di_gid))) { | 733 | (!in_group_p(xfs_gid_to_kgid(ip->i_d.di_gid)))) { |
734 | ip->i_d.di_mode &= ~S_ISGID; | 734 | ip->i_d.di_mode &= ~S_ISGID; |
735 | } | 735 | } |
736 | 736 | ||
@@ -1178,7 +1178,8 @@ xfs_create( | |||
1178 | /* | 1178 | /* |
1179 | * Make sure that we have allocated dquot(s) on disk. | 1179 | * Make sure that we have allocated dquot(s) on disk. |
1180 | */ | 1180 | */ |
1181 | error = xfs_qm_vop_dqalloc(dp, current_fsuid(), current_fsgid(), prid, | 1181 | error = xfs_qm_vop_dqalloc(dp, xfs_kuid_to_uid(current_fsuid()), |
1182 | xfs_kgid_to_gid(current_fsgid()), prid, | ||
1182 | XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, | 1183 | XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, |
1183 | &udqp, &gdqp, &pdqp); | 1184 | &udqp, &gdqp, &pdqp); |
1184 | if (error) | 1185 | if (error) |