From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9806E1534EC for ; Mon, 13 May 2024 13:37:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715607421; cv=none; b=jJPYZUsw/av9l8ZbSAXcEhNYWjbsgl9LRuoS5v4ULsgTo0vpEN4i0GqcYx2qnlCAbT5AHVzfS1ML9h8gFevIG8vFKJe1Bdv7I0DhQ4nXqZDH8GdTBpRHc0edc3JIPHIQXa2RC9LuzOrQebstVpoALruZDJFWN9CB+ntLb+YIW44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715607421; c=relaxed/simple; bh=stgORpcctC2/lPVA5xiuFvUD4vO7tLe+sBcaALwN0bQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=eoeQ/xZJ46JeNM9VZ3qYMGa6befX4dJTKfX1mLlLEwvUiMfjnAhZmAqE17OikP/nbCbQZx/zyBBS+uPkkCTVJAxuBHhXZSwzTLzae8fS0Je395vUnwfazWY+rVcY2DZmfEXxlmdnGScqRocwq28pMWcSj4S+9ks7w/DCr2c9HBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ob4NdlqB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ob4NdlqB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0987EC32786; Mon, 13 May 2024 13:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715607421; bh=stgORpcctC2/lPVA5xiuFvUD4vO7tLe+sBcaALwN0bQ=; h=Subject:To:Cc:From:Date:From; b=Ob4NdlqBUrL/lRN7By9GHLq4l05WE0nLkNJ4TG34ISp5RON7sVwvKgK0a7elfUL/6 cXdR/BIB3t3Zlq1Iv4XIHXYqBau5LXkFDZzj5IE92MA58Sop6mdHyAkk7RU0CMKTTf 88bBxpKqEvVy0+uir+jZj3467XMHpLGEadPtDkMY= Subject: FAILED: patch "[PATCH] btrfs: add missing mutex_unlock in" failed to apply to 5.4-stable tree To: dominique.martinet@atmark-techno.com,dsterba@suse.com,pavel@denx.de Cc: From: Date: Mon, 13 May 2024 15:36:47 +0200 Message-ID: <2024051346-vintage-pull-0a38@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y git checkout FETCH_HEAD git cherry-pick -x 9af503d91298c3f2945e73703f0e00995be08c30 # git commit -s git send-email --to '' --in-reply-to '2024051346-vintage-pull-0a38@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: 9af503d91298 ("btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()") 7411055db5ce ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 9af503d91298c3f2945e73703f0e00995be08c30 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 19 Apr 2024 11:22:48 +0900 Subject: [PATCH] btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks() The previous patch that replaced BUG_ON by error handling forgot to unlock the mutex in the error path. Link: https://lore.kernel.org/all/Zh%2fHpAGFqa7YAFuM@duo.ucw.cz Reported-by: Pavel Machek Fixes: 7411055db5ce ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()") CC: stable@vger.kernel.org Reviewed-by: Pavel Machek Signed-off-by: Dominique Martinet Reviewed-by: David Sterba Signed-off-by: David Sterba diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index dedec3d9b111..c72c351fe7eb 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3419,6 +3419,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; }