From patchwork Sat May 29 09:49:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103031 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 o4T9nQ3K027362 for ; Sat, 29 May 2010 09:49:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756083Ab0E2JtX (ORCPT ); Sat, 29 May 2010 05:49:23 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:49673 "EHLO mail-ew0-f216.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754108Ab0E2JtW (ORCPT ); Sat, 29 May 2010 05:49:22 -0400 Received: by ewy8 with SMTP id 8so555599ewy.28 for ; Sat, 29 May 2010 02:49:20 -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:mime-version:content-type:content-disposition:user-agent; bh=i0jCQJBCy0IVsguVkSfmNQiO//T/cIqklPh864MlWw8=; b=lRwvsTbmdt8mtr37qbeF+HCz0KCcTBYu1Tl8th/1o3Bx9yVTLZQm8ywiFUhAMIRzeL f7T8hR0QDlu4J54AdUuMN3zJQCfGuwWzmCgLWrfHzYsrxSmAh1wnxEHYZGbRrQvXA4nO VBtrGO/fquspGnqwi1b7zBpaUguzjOeFQLkLg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=jVRRndGmsmXqrh6WGhXcPj0v5IkDrbSd5Fes8C7kQ5PpQKratwRw/aLtOpdZriFqoe ZH7xjnFm1WD8BSNrh5LwvC0vUfwdDGHuelfN1YzgMsbP+of1pbhbB0hl8lDG+w3FYruP Va0fdJdJOervhotAD9PnDbI1lY/k6sZStCr7A= Received: by 10.213.31.132 with SMTP id y4mr369053ebc.23.1275126560335; Sat, 29 May 2010 02:49:20 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 15sm1706144ewy.0.2010.05.29.02.49.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:49:19 -0700 (PDT) Date: Sat, 29 May 2010 11:49:07 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Yan Zheng , Josef Bacik , Christoph Hellwig , Chris Mason , kernel-janitors@vger.kernel.org Subject: [patch 11/11] btrfs: The file argument for fsync() is never null Message-ID: <20100529094907.GL5483@bicker> 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, 29 May 2010 09:49:26 +0000 (UTC) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 787b50a..e252d23 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1140,7 +1140,7 @@ int btrfs_sync_file(struct file *file, int datasync) /* * ok we haven't committed the transaction yet, lets do a commit */ - if (file && file->private_data) + if (file->private_data) btrfs_ioctl_trans_end(file); trans = btrfs_start_transaction(root, 0);