diff options
author | Nikolay Borisov <[email protected]> | 2016-05-22 14:15:57 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-07-25 13:21:49 -0700 |
commit | 2c6abf15ff5bcc979653eef0131f90d4f0fede21 (patch) | |
tree | 29bc74006a16d50335196ccd1e7459b569e48b57 /module/zfs/zfs_dir.c | |
parent | 82a1b2d6289f9ceae0bee6f1e71d3bc29a8c5d16 (diff) |
Remove znode's z_uid/z_gid member
Remove duplicate z_uid/z_gid member which are also held in the
generic vfs inode struct. This is done by first removing the members
from struct znode and then using the KUID_TO_SUID/KGID_TO_SGID
macros to access the respective member from struct inode. In cases
where the uid/gids are being marshalled from/to disk, use the newly
introduced zfs_(uid|gid)_(read|write) functions to properly
save the uids rather than the internal kernel representation.
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #4685
Issue #227
Diffstat (limited to 'module/zfs/zfs_dir.c')
-rw-r--r-- | module/zfs/zfs_dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c index 564f71596..8eee626d9 100644 --- a/module/zfs/zfs_dir.c +++ b/module/zfs/zfs_dir.c @@ -1104,8 +1104,10 @@ zfs_sticky_remove_access(znode_t *zdp, znode_t *zp, cred_t *cr) if ((zdp->z_mode & S_ISVTX) == 0) return (0); - downer = zfs_fuid_map_id(zsb, zdp->z_uid, cr, ZFS_OWNER); - fowner = zfs_fuid_map_id(zsb, zp->z_uid, cr, ZFS_OWNER); + downer = zfs_fuid_map_id(zsb, KUID_TO_SUID(ZTOI(zdp)->i_uid), + cr, ZFS_OWNER); + fowner = zfs_fuid_map_id(zsb, KUID_TO_SUID(ZTOI(zp)->i_uid), + cr, ZFS_OWNER); if ((uid = crgetuid(cr)) == downer || uid == fowner || (S_ISDIR(ZTOI(zp)->i_mode) && |