git: 6446348a4f37 - stable/13 - mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 29 May 2024 05:36:27 UTC
The branch stable/13 has been updated by kib:

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

commit 6446348a4f37d49fe4c674ffe2d81a93b0dca0b5
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-05-22 01:46:28 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-05-29 05:36:13 +0000

    mqueuefs: uma_zfree() can be postponed until mqfs sx mi_lock is dropped
    
    (cherry picked from commit b6f4a3fa75d24637b4d81035655fcb3d3ea187ad)
---
 sys/kern/uipc_mqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c
index 5256a00cd831..be3e3fefa749 100644
--- a/sys/kern/uipc_mqueue.c
+++ b/sys/kern/uipc_mqueue.c
@@ -1112,9 +1112,9 @@ mqfs_reclaim(struct vop_reclaim_args *ap)
 	sx_xlock(&mqfs->mi_lock);
 	vp->v_data = NULL;
 	LIST_REMOVE(vd, mv_link);
-	uma_zfree(mvdata_zone, vd);
 	mqnode_release(pn);
 	sx_xunlock(&mqfs->mi_lock);
+	uma_zfree(mvdata_zone, vd);
 	return (0);
 }