From patchwork Fri Nov 30 06:02:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Sheng-Hui X-Patchwork-Id: 1823711 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0AA293FC23 for ; Fri, 30 Nov 2012 06:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752300Ab2K3GDO (ORCPT ); Fri, 30 Nov 2012 01:03:14 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:36328 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259Ab2K3GDO (ORCPT ); Fri, 30 Nov 2012 01:03:14 -0500 Received: by mail-ie0-f174.google.com with SMTP id c11so157198ieb.19 for ; Thu, 29 Nov 2012 22:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Qkmmdimp1P4MFNsWEhJmor7DwC9LKAf3n1atx6w1zJ8=; b=IT88Wd9Lx121LQ4czIUP6D7sv6ZLZo7jy8RL2FN3Y4CBeHEIEyB9o4iQqDvj7gZCv6 SXYfecxolf/OEKjAB7P3YP54wD7hN+eKxTDRAgES9ml8B180jVuYMtcFW4S/9VUJZW2a jTQ6sunn86sFnjv05QQeNEmkiaUn8sXkRNPVL3i8zqqZJozTVmGVjXAM8HnBE30ccE7+ QsWUlA0VXOHSBJApsUkOO5NK+wcRgTJU0JxaOdi1aFnl8hWVY7Ly7e5VGU1eSDitp4Z6 bwF/Jk439SdM5jnGm53sqO7EN9JxDgVIXaTKkKYa7uwn/wWxNgcam6pmWkRx4mnCUVGr YOpw== Received: by 10.50.152.240 with SMTP id vb16mr133646igb.45.1354255393716; Thu, 29 Nov 2012 22:03:13 -0800 (PST) Received: from localhost ([202.108.130.138]) by mx.google.com with ESMTPS id az6sm9330407igb.11.2012.11.29.22.02.47 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Nov 2012 22:03:12 -0800 (PST) From: shhuiw@gmail.com To: chris.mason@fusionio.com, jbacik@fusionio.com Cc: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: remove warning check in io_ctl_map_page Date: Fri, 30 Nov 2012 14:02:26 +0800 Message-Id: <50b84c20.a657320a.776a.fffff16d@mx.google.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1354255348-5011-1-git-send-email-y> References: <1354255348-5011-1-git-send-email-y> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Wang Sheng-Hui io_ctl_map_page is called by many functions in free-space-cache. In some scenarios, the ->cur is not null, e.g. io_ctl_add_entry. Remove the check here. Signed-off-by: Wang Sheng-Hui --- fs/btrfs/free-space-cache.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index c3318cb..4ea66d4 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -307,7 +307,6 @@ static void io_ctl_unmap_page(struct io_ctl *io_ctl) static void io_ctl_map_page(struct io_ctl *io_ctl, int clear) { - WARN_ON(io_ctl->cur); BUG_ON(io_ctl->index >= io_ctl->num_pages); io_ctl->page = io_ctl->pages[io_ctl->index++]; io_ctl->cur = kmap(io_ctl->page);