From patchwork Thu Apr 28 09:18:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 738881 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 p3S9IecH026383 for ; Thu, 28 Apr 2011 09:18:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751201Ab1D1JSi (ORCPT ); Thu, 28 Apr 2011 05:18:38 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:51601 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898Ab1D1JSh (ORCPT ); Thu, 28 Apr 2011 05:18:37 -0400 Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 84F373EE0B6 for ; Thu, 28 Apr 2011 18:18:35 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 6809545DE50 for ; Thu, 28 Apr 2011 18:18:35 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 4FC4345DE4F for ; Thu, 28 Apr 2011 18:18:35 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 3EFF9E78007 for ; Thu, 28 Apr 2011 18:18:35 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.240.81.146]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 075D41DB803E for ; Thu, 28 Apr 2011 18:18:35 +0900 (JST) Received: from m106.css.fujitsu.com (m106 [127.0.0.1]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id B89AF5B91FD; Thu, 28 Apr 2011 18:18:34 +0900 (JST) Received: from T-ITOH1.jp.fujitsu.com (unknown [10.124.101.84]) by m106.s.css.fujitsu.com (Postfix) with SMTP id 2F2BE5B91F0; Thu, 28 Apr 2011 18:18:34 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.4.0 Received: from T-ITOH1[10.124.101.84] by T-ITOH1 (FujitsuOutboundMailChecker v1.4.0/9992[10.124.101.84]); Thu, 28 Apr 2011 18:18:31 +0900 (JST) Message-Id: <201104280918.AA00019@T-ITOH1.jp.fujitsu.com> From: Tsutomu Itoh Date: Thu, 28 Apr 2011 18:18:21 +0900 To: linux-btrfs@vger.kernel.org Cc: chris.mason@oracle.com Subject: [PATCH] Btrfs: check return value of btrfs_inc_extent_ref() MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Apr 2011 09:18:42 +0000 (UTC) If return value of btrfs_inc_extent_ref() is not 0, BUG() is called. Signed-off-by: Tsutomu Itoh --- fs/btrfs/tree-log.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f997ec0..23fb42d 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -590,6 +590,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, ins.objectid, ins.offset, 0, root->root_key.objectid, key->objectid, offset); + BUG_ON(ret); } else { /* * insert the extent pointer in the extent