Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp854399pxk; Thu, 17 Sep 2020 19:10:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC9i8EF4OZKviJalS8yCj8lNMQLyCe1U65q5p2EimN/ka8B99iOKIcDTrt7eO7fmTaY3UI X-Received: by 2002:a50:cd51:: with SMTP id d17mr7000708edj.93.1600395043216; Thu, 17 Sep 2020 19:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600395043; cv=none; d=google.com; s=arc-20160816; b=a4CbffoPITtuhUqMBFF3ivN/Ns1tb7XtsVVEG/f3uD7cY02T5RDS3ZDm30LOTMNz1t br23dnBUg8/0Sk7zWesEKTwnCngYn+qNTs4BXucJ22F1S1Y9vgpGjNZbjRMnvIGEqMLf /W+R2kzNb6QiPIzO2VATyk0iocpwkUP2L+W4ZZEt5KnwFkJIPZ8BNThIy5T/BVJKkHFz w1xQOL9Auc2qU5ES0z7exgfuRWjJL/Ac/B6yFmnPOIHpHhlL51XnemtWjSqYUdctVprc iwMdpJim7S/Gm2VPlQ2/gSVMzM1VjgiRypCMg5AV6f7BUGJ4hsKRsJom38ibzPQb0wmX lVJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jgMD2V3+mTxhURS6XkC0NYgvIPQ1qWbHvlmEVQUEPEg=; b=gfa2w+VGO+8u9rRUliIP46+Xmq6UFYuMpvVb8fL7ZIVV8xBhZoXS1uj85BAjcp/R4C o/GhF2tEDL4HfaKUSWoLUXMt4kydf4zV+3W0AbUzCNh52BDV8j8GwGC06B9NP3/DO1Ib slvPg7mHGRMI0sUArD90Xb0UV8d+9pnHNQq+xjP+ze1NhOIrufzqaPnAPVGiaxAI7EkE YFNK5eUDYxNPUUV3LUmZuLglIusU2x6nYhoFVOkk5BDWpMJwVBAogns/ik5SlIOIBIoy ptl3iXQVQPI66M9LPp8IV3vA2nzS1mo3N3Ngo2WG2BaS+cuogNNKcFbiReaO2mOQYYtx fbhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lC/aKjn9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si1031168edm.308.2020.09.17.19.10.20; Thu, 17 Sep 2020 19:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lC/aKjn9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727892AbgIRCHN (ORCPT + 99 others); Thu, 17 Sep 2020 22:07:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:57128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727849AbgIRCHI (ORCPT ); Thu, 17 Sep 2020 22:07:08 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 157C223A03; Fri, 18 Sep 2020 02:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394820; bh=DDxF845h1pAP92mHR2gh3x4UCcQR5hpUgSszHYxM3+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lC/aKjn9/UtHRLrLzoBoIzWwxKOdAiDL8+Ga0/2qu2EQ7sQn03Y55YSz0MFadK5vo GOIFrmHzJQ7f7562Dy0OWQmgR5/1ACKjJyFJoBOSDG+Xoqq9ew5Z+gKEpnfQopRFgl 0lQM1vw/KUu6d3lm8Ae5QfU5wk2nZNGBo+34/vMU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Sterba , Sasha Levin , linux-btrfs@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 286/330] btrfs: don't force read-only after error in drop snapshot Date: Thu, 17 Sep 2020 22:00:26 -0400 Message-Id: <20200918020110.2063155-286-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Sterba [ Upstream commit 7c09c03091ac562ddca2b393e5d65c1d37da79f1 ] Deleting a subvolume on a full filesystem leads to ENOSPC followed by a forced read-only. This is not a transaction abort and the filesystem is otherwise ok, so the error should be just propagated to the callers. This is caused by unnecessary call to btrfs_handle_fs_error for all errors, except EAGAIN. This does not make sense as the standard transaction abort mechanism is in btrfs_drop_snapshot so all relevant failures are handled. Originally in commit cb1b69f4508a ("Btrfs: forced readonly when btrfs_drop_snapshot() fails") there was no return value at all, so the btrfs_std_error made some sense but once the error handling and propagation has been implemented we don't need it anymore. Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/extent-tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 541497036cc24..60c3a03203fae 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5429,8 +5429,6 @@ out: */ if (!for_reloc && !root_dropped) btrfs_add_dead_root(root); - if (err && err != -EAGAIN) - btrfs_handle_fs_error(fs_info, err, NULL); return err; } -- 2.25.1