mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
slightly simplify zfs_vptocnp
It's not necessary to look up the parent's ID to check if the node is the root node of the filesystem. MFC after: 2 weeks
This commit is contained in:
parent
83f60cb202
commit
86261a95ed
1 changed files with 1 additions and 8 deletions
|
|
@ -5925,7 +5925,6 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
|
|||
vnode_t *vp = ap->a_vp;;
|
||||
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
|
||||
znode_t *zp = VTOZ(vp);
|
||||
uint64_t parent;
|
||||
int ltype;
|
||||
int error;
|
||||
|
||||
|
|
@ -5936,13 +5935,7 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
|
|||
* If we are a snapshot mounted under .zfs, run the operation
|
||||
* on the covered vnode.
|
||||
*/
|
||||
if ((error = sa_lookup(zp->z_sa_hdl,
|
||||
SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) {
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (error);
|
||||
}
|
||||
|
||||
if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) {
|
||||
if (zp->z_id != zfsvfs->z_root || zfsvfs->z_parent == zfsvfs) {
|
||||
char name[MAXNAMLEN + 1];
|
||||
znode_t *dzp;
|
||||
size_t len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue