]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs: Fix a pair of bugs in zfs_fhtovp()
authorMark Johnston <markj@FreeBSD.org>
Mon, 24 Oct 2022 15:55:48 +0000 (11:55 -0400)
committerMark Johnston <markj@FreeBSD.org>
Thu, 27 Oct 2022 12:00:01 +0000 (08:00 -0400)
commit562c9ac58c7678b13f52b0bfe63148e40d7bf63d
treeb3b589c72810d21cf0d1532fd4b9b5483193b624
parent7e53019b06d5fd66b6db9fe2edd0bbbdb5eec2a8
zfs: Fix a pair of bugs in zfs_fhtovp()

This cherry-picks upstream ed566bf1cd0bdbf85e8c63c1c119e3d2ef5db1f6

    - 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.

PR: 266236

(cherry picked from commit 6fe0a6c80a1aff14236924eb33e4013aa8c14f91)
sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c