]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
FreeBSD: Fix a pair of bugs in zfs_fhtovp()
authorMark Johnston <markjdb@gmail.com>
Tue, 11 Oct 2022 19:29:55 +0000 (15:29 -0400)
committerGitHub <noreply@github.com>
Tue, 11 Oct 2022 19:29:55 +0000 (12:29 -0700)
commited566bf1cd0bdbf85e8c63c1c119e3d2ef5db1f6
treece535da84e88c31b85308abc14fce37f9bdfa9c5
parent4dcc2bde9c8347fd7969871b69e72cba0b6d4ef7
FreeBSD: Fix a pair of bugs in zfs_fhtovp()

- Add a zfs_exit() call in an error path, otherwise a lock is leaked.
- Remove the fid_gen > 1 check.  That appears to be Linux-specific:
  zfsctl_snapdir_fid() sets fid_gen to 0 or 1 depending on whether the
  snapshot directory is mounted.  On FreeBSD it fails, making snapshot
  dirs inaccessible via NFS.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Andriy Gapon <avg@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Fixes: 43dbf8817808 ("FreeBSD: vfsops: use setgen for error case")
Closes #14001
Closes #13974
module/os/freebsd/zfs/zfs_vfsops.c