From patchwork Fri Dec 10 15:06:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 398692 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBAFGrkS010758 for ; Fri, 10 Dec 2010 15:16:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940Ab0LJPQu (ORCPT ); Fri, 10 Dec 2010 10:16:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32168 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799Ab0LJPQu (ORCPT ); Fri, 10 Dec 2010 10:16:50 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBAFGo0K011016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 Dec 2010 10:16:50 -0500 Received: from localhost.localdomain (test1244.test.redhat.com [10.10.10.244]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBAFGnnx028154 for ; Fri, 10 Dec 2010 10:16:49 -0500 From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots UPDATED Date: Fri, 10 Dec 2010 10:06:25 -0500 Message-Id: <1291993585-1782-1-git-send-email-josef@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 15:16:54 +0000 (UTC) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 8aed05e..d2add51 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6352,9 +6352,14 @@ int btrfs_drop_snapshot(struct btrfs_root *root, NULL, NULL); BUG_ON(ret < 0); if (ret > 0) { + /* + * Don't bother checking the return value, either we + * succeeded or we did not, either way the orphan item + * will get cleaned up properly, wether its now or on + * the next mount. + */ ret = btrfs_del_orphan_item(trans, tree_root, root->root_key.objectid); - BUG_ON(ret); } }