git: a5ff86646ee4 - main - UFSSUSPEND: unbusy mp in EDADLK case
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Dec 2022 09:45:35 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ff86646ee4602a141a24eee95c1c60bb375030 commit a5ff86646ee4602a141a24eee95c1c60bb375030 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-12-29 22:09:57 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-12-30 09:44:20 +0000 UFSSUSPEND: unbusy mp in EDADLK case Reported and tested by: pho Fixes: 701b36961cbd2084c36eb828402d0ef89211d929 Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_suspend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c index a68f25d5eed2..5e3258089fd0 100644 --- a/sys/ufs/ffs/ffs_suspend.c +++ b/sys/ufs/ffs/ffs_suspend.c @@ -310,8 +310,10 @@ ffs_susp_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, */ error = curproc->p_numthreads > 1 ? EDEADLK : descrip_check_write_mp(curproc->p_fd, mp); - if (error != 0) + if (error != 0) { + vfs_unbusy(mp); break; + } error = ffs_susp_suspend(mp); if (error != 0) {