From patchwork Sat Mar 20 11:22:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 87094 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2KBMje8004217 for ; Sat, 20 Mar 2010 11:22:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751795Ab0CTLWV (ORCPT ); Sat, 20 Mar 2010 07:22:21 -0400 Received: from mail-bw0-f209.google.com ([209.85.218.209]:61111 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754Ab0CTLWU (ORCPT ); Sat, 20 Mar 2010 07:22:20 -0400 Received: by bwz1 with SMTP id 1so659073bwz.21 for ; Sat, 20 Mar 2010 04:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=UdmH5+LRlIiVq2sna8rMhfpMQfX5qxKfipPsZY6N5Ek=; b=FJPCVjzbCCfDURkYZK9tJc0w3AI38avW5M4qbqpspJbnI/ZHkdRyTvZhVjmtPKXLTH obL2qGEnczoxt8VbioB3oQB9Hkb78375poaKct9Ze9wiY2oKsqvMYGhuNJLsy8dNOxqh /OXeXBOMmH389s1VnqolYCOEeWTJlN8jN9Pyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=w34IBrJq1MzKsGg0xScQhCd9tqEmwcJhbacnf5fZQKS4RvGewi1LXPYosKVA2joIQs 5pDVNYRafGUlpgmGlLNIeHUTS5S3p6iY2yYNHVQmQcKM26vc+cTSPy9tLRKsWDeZGL6q 2ezEeIvYShoErryEUQA2ECnKvbisnAzfamCOE= Received: by 10.204.32.77 with SMTP id b13mr4721170bkd.113.1269084138365; Sat, 20 Mar 2010 04:22:18 -0700 (PDT) Received: from bicker ([196.43.68.220]) by mx.google.com with ESMTPS id 24sm9003073bkr.12.2010.03.20.04.22.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Mar 2010 04:22:17 -0700 (PDT) Date: Sat, 20 Mar 2010 14:22:10 +0300 From: Dan Carpenter To: Chris Mason Cc: Yan Zheng , Josef Bacik , Sage Weil , Al Viro , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 1/3] btrfs: checking for NULL instead of IS_ERR() Message-ID: <20100320112210.GV5331@bicker> Mail-Followup-To: Dan Carpenter , Chris Mason , Yan Zheng , Josef Bacik , Sage Weil , Al Viro , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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 (demeter.kernel.org [140.211.167.41]); Sat, 20 Mar 2010 11:22:45 +0000 (UTC) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2845c6c..15f661d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -511,7 +511,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len, em = btrfs_get_extent(inode, NULL, 0, start, len, 0); unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); - if (!em) + if (IS_ERR(em)) return 0; }