From patchwork Fri Nov 23 03:03:14 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: 1793571 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 8159C3FC64 for ; Fri, 23 Nov 2012 03:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757536Ab2KWDDh (ORCPT ); Thu, 22 Nov 2012 22:03:37 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:40614 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757489Ab2KWDDg (ORCPT ); Thu, 22 Nov 2012 22:03:36 -0500 Received: by mail-ie0-f174.google.com with SMTP id k11so2804468iea.19 for ; Thu, 22 Nov 2012 19:03:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=OCRWvfTbBsPlyhwUPBhZ5HY16mzTTaUJ3VMFGjt/Vws=; b=mmuGuB23vHvp0nYtcp44MUKJV2jyh3hfZblVyyfJLn6FO6RjNsk2lLKEZm6ynB4Xj+ G9CSQOm8oSEFFQ5QZWIBqaQHkC6+w2V1hrn0EhObY7lPcYZWU4oQLiNxg+WmdsETYct9 A7encD/i0x2Rl2trkTZ2gWSdPSyEdztNr91ICa23DGOqWFdkpeXvs9wd5T+KWOfjuZC3 NbGYoVczTlC70+RYw9a2T/AyVxUmnK46c5n5y1mPilALq4OXp5G1cwlv/8uq6wC87elm s6mkRQQ1ARjnmjJ4ji/zd2neAOD16mnsbaKVVDDBJJqtVMe/qHuIsGINiJgUit6vS34P OteQ== Received: by 10.50.77.199 with SMTP id u7mr2331165igw.17.1353639816289; Thu, 22 Nov 2012 19:03:36 -0800 (PST) Received: from crossover.org ([202.108.130.138]) by mx.google.com with ESMTPS id wm10sm3466114igc.2.2012.11.22.19.03.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 19:03:34 -0800 (PST) Message-ID: <50AEE772.7000008@gmail.com> Date: Fri, 23 Nov 2012 11:03:14 +0800 From: Wang Sheng-Hui User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: chris.mason@fusionio.com, Josef Bacik , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Btrfs: do not warn_on io_ctl->cur in io_ctl_map_page Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org io_ctl_map_page is called by many functions in free-space-cache. In most scenarios, the ->cur is not null, e.g. io_ctl_add_entry. I think we'd better remove the warn_on 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 1027b85..31fcf24 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);