Skip to content

Commit

Permalink
module: zfs: freebsd: vfsops: use setgen for error case
Browse files Browse the repository at this point in the history
  • Loading branch information
nabijaczleweli committed Dec 22, 2021
1 parent 9ba5d8d commit 1c455ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/os/freebsd/zfs/zfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,12 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp)
return (SET_ERROR(EINVAL));
}

if (fid_gen > 1 || setgen != 0) {
dprintf("snapdir fid: fid_gen (%llu) and setgen (%llu)\n",
fid_gen, setgen);
return (SET_ERROR(EINVAL));
}

/*
* A zero fid_gen means we are in .zfs or the .zfs/snapshot
* directory tree. If the object == zfsvfs->z_shares_dir, then
Expand Down

0 comments on commit 1c455ba

Please sign in to comment.