git: b8bb73ab724b - main - pseudofs: Fix LOR in VOP_READDIR.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Sun, 26 Feb 2023 16:24:47 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=b8bb73ab724b19063481dba089c3dc9a8e1926b1

commit b8bb73ab724b19063481dba089c3dc9a8e1926b1
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2023-02-26 15:30:53 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2023-02-26 15:30:53 +0000

    pseudofs: Fix LOR in VOP_READDIR.
    
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D20862
---
 sys/fs/pseudofs/pseudofs_vnops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index eae4c1c71ab9..f4e27b469213 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -897,8 +897,8 @@ pfs_readdir(struct vop_readdir_args *va)
 		if (!pfs_visible_proc(curthread, pd, proc)) {
 			_PRELE(proc);
 			PROC_UNLOCK(proc);
-			sx_sunlock(&allproc_lock);
 			pfs_unlock(pd);
+			sx_sunlock(&allproc_lock);
 			PFS_RETURN (ENOENT);
 		}
 	}