Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp366796lqt; Thu, 18 Apr 2024 19:23:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVn8HqPwZxuOYqUIDnt5FmS3neHBHdbp8vqQQgBXdjjo/srT1LjHZRHTXjQs5syc1AZ/1vyp6tGU0NTee3dz4arGdEhoeSYIoyoid8jPQ== X-Google-Smtp-Source: AGHT+IGDdev8JHSqHIUr4vEr9K+AiyngwoLzB+fB2RemzlOT38kybPceZlul8sbNibP3XbCJbDM6 X-Received: by 2002:a05:6808:3010:b0:3c5:e81a:b5b6 with SMTP id ay16-20020a056808301000b003c5e81ab5b6mr1010992oib.59.1713493400597; Thu, 18 Apr 2024 19:23:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713493400; cv=pass; d=google.com; s=arc-20160816; b=yFM/w+Y2hPOHCqbhHEcxiR2oqtpegunpafVmABCOyAyVV6I1E4Z5vrDcLlUUqB65tw y6deA7t6RFaI9XeLybkNPfRb8S+Ax48PDD/0slWDSJ9kmuzYnIXui04V8oAmIv3hC6NL X7PB0mKfXl8puhBF1nInqiooOQGLUQ2nbdeumsdsHHB+NVPhV45RV3Kcu2TBxp2K7sQ7 rI0DdIhdr+X0+MKh+u7k8I6wUZa8Zwy+rfsCL+jQKakFy0DO4uEcOS3BV82DNlq8wrhp 7vrX8gDK0qbICsm34PrMh1RRL6Cy5RcYkZyNXK9qRGZAuhXAcRKl9umlPq1wrdQ15TCd UxUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature:dkim-signature; bh=dey0f+0Jtz8lFCvTxKq0L2AIbLXAE1Fp/uaRIkkiwPY=; fh=IoeMT9ddtOvgNehkBbwRzBtt/rCwrFW4TZ09Sfa10BA=; b=vjFF/egP5f7ZkcCgTKMNiV3iz71eBMUc9xvke/FAK1ON4DiPNHo2adndgpT7Que0Us MaDlwcwThfKOif5nUgR+qsTonSgqyXP5LUuvbZB2MkvTTzkCsBYMcXxrirNUnrfhzac2 SMiIKF0YZwM+9YZIC07KpTRfQl5M11grt7V0deUK27lonjMWPs6Kz5V4XczKvBvSLx8q FjroBOGEWjC9E1MkLVPCHeEb1dRhKdZeo8faBy9j+HxRezpktPNAdSKj4mF13o/Dop6N AYhIf9PX9TFO2+EHIJSPQao6yh/Ifu7vwOY/4Tabg5im0fY6pntRTE+p3h8g33qF3h2J Iejw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=15H+RZxc; dkim=pass header.i=@codewreck.org header.s=2 header.b=15H+RZxc; arc=pass (i=1 spf=pass spfdomain=codewreck.org dkim=pass dkdomain=codewreck.org dkim=pass dkdomain=codewreck.org dmarc=pass fromdomain=codewreck.org); spf=pass (google.com: domain of linux-kernel+bounces-150938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e16-20020a63e010000000b005dc6d22d2b6si2371718pgh.794.2024.04.18.19.23.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 19:23:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=15H+RZxc; dkim=pass header.i=@codewreck.org header.s=2 header.b=15H+RZxc; arc=pass (i=1 spf=pass spfdomain=codewreck.org dkim=pass dkdomain=codewreck.org dkim=pass dkdomain=codewreck.org dmarc=pass fromdomain=codewreck.org); spf=pass (google.com: domain of linux-kernel+bounces-150938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D408282FB9 for ; Fri, 19 Apr 2024 02:23:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3D606107; Fri, 19 Apr 2024 02:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b="15H+RZxc"; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b="15H+RZxc" Received: from nautica.notk.org (nautica.notk.org [91.121.71.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E3F115BB; Fri, 19 Apr 2024 02:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.121.71.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713493389; cv=none; b=l3JKdw2X4H8ZVVDNYVQO4LQIveMYTvti0pZwtJ465S5FwkjLy2Lce5RR7kYc5Fvp6XyUXZQ4McKwMEjB/HsqlDv/vWd4MK5PgcYKNUx62sGMP+nSFlZD+t3dHTn0KDjfKWGAM2NP1Bx4u1iFh+Wosg0ExsKOkcEkzZL4Ys+dsMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713493389; c=relaxed/simple; bh=YWIvHmwPsFjnECnsYOTQPHTSsM5bF0cCK0ua+j7JWK8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Tj453N9WwNzyJQBffsT6fJb6mAmGwWybm9tzLCPcjsbQaa4u5viemTiwMYq7Oh5Mv/vUOVQL4qq9sF7e8R5frAT7oL++nVIeW4xD5YG0CJJae9ySfuWrH73A0A/P5LO+hlvHnbcHRN5fJXZ+xJ1HTl7UeremkoLxXB++9EPsk2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org; spf=pass smtp.mailfrom=codewreck.org; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b=15H+RZxc; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b=15H+RZxc; arc=none smtp.client-ip=91.121.71.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codewreck.org Received: by nautica.notk.org (Postfix, from userid 108) id F1620C01D; Fri, 19 Apr 2024 04:23:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1713493385; bh=dey0f+0Jtz8lFCvTxKq0L2AIbLXAE1Fp/uaRIkkiwPY=; h=From:Date:Subject:To:Cc:From; b=15H+RZxcUqlMFX7ZV4nDUoE56YYNSddgeUhKmYR3456zpIQoHRl1FpeLnsr3voRns YSVzjF/yzMR3o+OHi2GoSdzC4Z9vNnRHA+baMs5ScAmwpv371gAZk8WuUPYVHARLCG HkI2ZC6O9ZtpV/7ZiXSL7uLDkGqvB7QDWD5UGVfd8QQXLm6MjZYhFKILJ/RJVFc0Bv XdifIVWShjQMpbzbakh0aNcgdP2Wf+jF6uDSirjvItimmTSZpyWCvgiQy8Vsd/kUNh NQolSc9m2IBQHmun8juSGKkGVFZzVmEJDtuQvPUgpfLm9+1Lh2umMrFmN9akuDFs76 OmK8CL9W14UHg== X-Spam-Level: Received: from gaia.codewreck.org (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 38679C009; Fri, 19 Apr 2024 04:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1713493385; bh=dey0f+0Jtz8lFCvTxKq0L2AIbLXAE1Fp/uaRIkkiwPY=; h=From:Date:Subject:To:Cc:From; b=15H+RZxcUqlMFX7ZV4nDUoE56YYNSddgeUhKmYR3456zpIQoHRl1FpeLnsr3voRns YSVzjF/yzMR3o+OHi2GoSdzC4Z9vNnRHA+baMs5ScAmwpv371gAZk8WuUPYVHARLCG HkI2ZC6O9ZtpV/7ZiXSL7uLDkGqvB7QDWD5UGVfd8QQXLm6MjZYhFKILJ/RJVFc0Bv XdifIVWShjQMpbzbakh0aNcgdP2Wf+jF6uDSirjvItimmTSZpyWCvgiQy8Vsd/kUNh NQolSc9m2IBQHmun8juSGKkGVFZzVmEJDtuQvPUgpfLm9+1Lh2umMrFmN9akuDFs76 OmK8CL9W14UHg== Received: from [127.0.0.1] (localhost.lan [::1]) by gaia.codewreck.org (OpenSMTPD) with ESMTP id cb34d8c8; Fri, 19 Apr 2024 02:22:57 +0000 (UTC) From: Dominique Martinet Date: Fri, 19 Apr 2024 11:22:48 +0900 Subject: [PATCH] btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240419-btrfs_unlock-v1-1-c3557976a691@codewreck.org> X-B4-Tracking: v=1; b=H4sIAHfVIWYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDE0NL3aSSorTi+NK8nPzkbF1L01SDJONUo1SjtGQloJaCotS0zAqwcdG xtbUALEvZuF4AAAA= To: Chris Mason , Josef Bacik , David Sterba , Anand Jain Cc: Greg Kroah-Hartman , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Dominique Martinet , Pavel Machek , stable@vger.kernel.org X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1219; i=asmadeus@codewreck.org; h=from:subject:message-id; bh=PQDfb7YN93UFq1W9UaceWw4qYGbjxHk52DSUfrpslKA=; b=owEBbQKS/ZANAwAIAatOm+xqmOZwAcsmYgBmIdWBHt6FPFqgoCOFtFR2ZsfKECrOk7B27Plfd qu1WHsMxTOJAjMEAAEIAB0WIQT8g9txgG5a3TOhiE6rTpvsapjmcAUCZiHVgQAKCRCrTpvsapjm cIUBD/40v1L0o/u1aYX/jSbe1+NO/6Hbl3Iw2V/NsLUs2zkHWnKC2cnwgRALEVz7XBouNh2tSdm hHPBL9lR6TbSYQ0DUrpTGh67QGRLYYCEirEi+hgQtWKTXQn6kc3UCJbEaYmA4lIKgJXzEjSjRry 2itAEZUNjvtFcViRlDZqFSGK6mNhPGQ/m99n4V+Lmz4kMa9YFhxWV9NtNeqPOm0CjgCzbKtXjZf inYgEiFjGGGGLNsd+UREqXtyqH4lwtqFNMb6XpeEJGhtD0eQedMrAPfQZNJuHkfU5y+uxh51FZv DPH7Ykw3LM2gcRMumAwVTHtZIj+JCEn2u4RpARUZmti0+oGSQKSMb1LckCiiPCFXH71A0u9lbrA ALmfr6cwDvrZhiW8OIJhrJi8nedTXaWuGtAUHOstN2FO2id4owqS3G++/YcEWRzw5GNu1Y9jF3p pGeEg/gWixBnOkxFt4Yg2D640PJb99Qkos7YXYSKzfipgBQoShr6I26DRR6LyRH46A4JysYHbNb yCClerECFb8xgwHz5amZqBqi4HvVTUde3+0QGTddFynXixiohMDImHGeDvW7q8f0E/nTdqn24RS FcefkWy1l/DAo6/uxYZBMV0WUo2T0GDgo0ZFhc8seEeKGX3WVEyZOMskHChrDLyI6Lu3K42Xzr+ 8y5kI7xk+7spAKw== X-Developer-Key: i=asmadeus@codewreck.org; a=openpgp; fpr=B894379F662089525B3FB1B9333F1F391BBBB00A From: Dominique Martinet The previous patch forgot to unlock in the error path Link: https://lore.kernel.org/all/Zh%2fHpAGFqa7YAFuM@duo.ucw.cz Reported-by: Pavel Machek Cc: stable@vger.kernel.org Fixes: 7411055db5ce ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()") Signed-off-by: Dominique Martinet --- Note for stable: the mutex has been renamed from delete_unused_bgs_mutex in 5.13, so the 5.10 and 4.19 backports need a trivial rename: s/reclaim_bgs_lock/delete_unused_bgs_mutex/ If required I'll send branch-specific patches after this is merged. --- fs/btrfs/volumes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f15591f3e54f..ef6bd2f4251b 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3455,6 +3455,7 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info) * alignment and size). */ ret = -EUCLEAN; + mutex_unlock(&fs_info->reclaim_bgs_lock); goto error; } --- base-commit: 2668e3ae2ef36d5e7c52f818ad7d90822c037de4 change-id: 20240419-btrfs_unlock-95e0b3e2e2fc Best regards, -- Dominique Martinet | Asmadeus