Eliminate Linux specific inode usage from common code

Change many of the znops routines to take a znode rather
than an inode so that zfs_replay code can be largely shared
and in the future the much of the znops code may be shared.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9708
This commit is contained in:
Matthew Macy
2019-12-11 11:53:57 -08:00
committed by Brian Behlendorf
parent f0bf435176
commit 657ce25357
18 changed files with 346 additions and 333 deletions
+4 -3
View File
@@ -231,7 +231,8 @@ zfs_xattr_owner_unlinked(znode_t *zp)
{
int unlinked = 0;
znode_t *dzp;
igrab(ZTOI(zp));
zhold(zp);
/*
* if zp is XATTR node, keep walking up via z_xattr_parent until we
* get the owner
@@ -242,11 +243,11 @@ zfs_xattr_owner_unlinked(znode_t *zp)
unlinked = 1;
break;
}
iput(ZTOI(zp));
zrele(zp);
zp = dzp;
unlinked = zp->z_unlinked;
}
iput(ZTOI(zp));
zrele(zp);
return (unlinked);
}