From nobody Fri Dec 30 09:45:35 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nk0k758Qgz2kldh; Fri, 30 Dec 2022 09:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nk0k74dYpz3Qcb; Fri, 30 Dec 2022 09:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672393535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q1UXoCbxfLvkY0djiDMlOvpGydF2VofIY1bBX2jLzgA=; b=MMln71okncePMxsLXdGXjVYuCpBi46/u59eDcQYn2xzqUNzh4eYcOBfqb2TsfyfGBQN6In 5FUz4ftSPS4JSOdF8A1NXz6rYGGJnRGXXaEM4tRedvh8gwNIKcgAY0AGBXWzQVdBkfYFFa 2KN5Hz74P3AO+zGSR5bR4QvnNyB1zC+5vNlMupE83XsvtCUaqdZflzentMJjSmC1oSDOBI cug18tx7pCqO2Ilx2R/lC0CthT1hc0pcJ5DSEfFKIt9Qakqe6KDkxMD6xQO/UFZLYJg+P6 LeS76r3bHvo9RGJwaOVgvDR2hNhzQzaXUWM9f/YeLNwdfxLCYKb8Er/l3cHTTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672393535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q1UXoCbxfLvkY0djiDMlOvpGydF2VofIY1bBX2jLzgA=; b=TIux2F/cFMN6rwHyAhE+E6RruDnPMF0GhZqSUwwikCNRK5vj/XbiQ6XS6it5Zxed6eirYr O04nCqBs1S7486PS4frM63PgCRVhvCxKdxaRHpV8J4c0UZ7VvfL8zG0gLrVqeyyLp4j3R1 gno2fDICDdDOYGxmYIRyNqEeuDJrOZ/wKIABvWq0ij9E65zzVwnd24Ggz+DbUR1TkP4d/W MByw7i2b6Q/3WCX5ParDwCf3YTn+Nq667ihD+wNkKNTwiDDvL6jabjMz53t/gwxlewwz+S WXHM9vsNaeYt0Vrogx/PKcRbpcMFGqTSd8Kj2k2yu/cyvqoYykFYdeRBHM0fuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672393535; a=rsa-sha256; cv=none; b=x7F9MdrKN4aNfF4v+1vzXVHskhgm3YTBADAYKPEAOaBmWAva5rs4XIBfTCxHOhQXcU6Tmy jqphe9dbP73+b637QRbKiEx1WUeryJwg064JjKlBiH+JNiDdeacfx2/TKURPrfU3RMj8eE 3uRc7Ih6y92Ys60qOR80ArD09PZ5xMYro/cjXw0bzpfBTERJ7ImTGy9Z6589taAT8mlCHw SEXQbGOaYFWRefeAwsYyQwIM2THGWxn6WnQApkFAMcZCQCwDf73yPEEkIAoL03ETUEPXYw Qklxx0k7+1SSKSlUUFsdypr0O2wJDA1JBj+Srk0nTmUxpIz2hor/QvcH3V7Sqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nk0k73ZjYz13vZ; Fri, 30 Dec 2022 09:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BU9jZMZ072964; Fri, 30 Dec 2022 09:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BU9jZcL072963; Fri, 30 Dec 2022 09:45:35 GMT (envelope-from git) Date: Fri, 30 Dec 2022 09:45:35 GMT Message-Id: <202212300945.2BU9jZcL072963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a5ff86646ee4 - main - UFSSUSPEND: unbusy mp in EDADLK case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5ff86646ee4602a141a24eee95c1c60bb375030 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a5ff86646ee4602a141a24eee95c1c60bb375030 commit a5ff86646ee4602a141a24eee95c1c60bb375030 Author: Konstantin Belousov AuthorDate: 2022-12-29 22:09:57 +0000 Commit: Konstantin Belousov 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) {