git: bbcc33086adc - stable/13 - msdosfs_remount_ro(): correct vfs_unbusy() loop

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 25 Jan 2024 04:32:13 UTC
The branch stable/13 has been updated by kib:

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

commit bbcc33086adc5e2baba3c97f1e53fedcaa504edb
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-19 23:50:48 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-24 13:04:38 +0000

    msdosfs_remount_ro(): correct vfs_unbusy() loop
    
    PR:     276408
    
    (cherry picked from commit 4b3ffc5918b9968ea6ddee6f6cdf3538072e5ef4)
---
 sys/fs/msdosfs/msdosfs_vfsops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index fe367122b3e3..b5392e62b578 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -1008,9 +1008,8 @@ msdosfs_remount_ro(void *arg, int pending)
 	}
 	MSDOSFS_UNLOCK_MP(pmp);
 
-	do {
+	while (--pending >= 0)
 		vfs_unbusy(pmp->pm_mountp);
-	} while (--pending >= 0);
 }
 
 void