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 <n.borisov.lkml@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4685
Issue #227
This commit is contained in:
Nikolay Borisov
2016-05-22 14:15:57 +03:00
committed by Brian Behlendorf
parent 82a1b2d628
commit 2c6abf15ff
10 changed files with 69 additions and 54 deletions
+2 -1
View File
@@ -627,10 +627,11 @@ zfs_owner_overquota(zfs_sb_t *zsb, znode_t *zp, boolean_t isgroup)
{
uint64_t fuid;
uint64_t quotaobj;
struct inode *ip = ZTOI(zp);
quotaobj = isgroup ? zsb->z_groupquota_obj : zsb->z_userquota_obj;
fuid = isgroup ? zp->z_gid : zp->z_uid;
fuid = isgroup ? KGID_TO_SGID(ip->i_gid) : KUID_TO_SUID(ip->i_uid);
if (quotaobj == 0 || zsb->z_replay)
return (B_FALSE);