git: 68d021de3455 - stable/14 - msdosfs_remount_ro(): correct vfs_unbusy() loop

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 25 Jan 2024 03:45:39 UTC
The branch stable/14 has been updated by kib:

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

commit 68d021de34550cf1d133a375ab13544d453323e1
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-19 23:50:48 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-25 03:44:55 +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 03c794bad900..258c701bd300 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -1006,9 +1006,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