From patchwork Sun Jul 25 18:53:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 114148 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6PIrKOR030412 for ; Sun, 25 Jul 2010 18:53:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752519Ab0GYSxR (ORCPT ); Sun, 25 Jul 2010 14:53:17 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:44240 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476Ab0GYSxQ convert rfc822-to-8bit (ORCPT ); Sun, 25 Jul 2010 14:53:16 -0400 Received: by bwz1 with SMTP id 1so2469018bwz.19 for ; Sun, 25 Jul 2010 11:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=yoDzNCsB9ilTbVv3OGc6KS/pIfWMzX23JA6wj6WmiMs=; b=Ofaq4XY7kK/pRT4/6ZuNGTzaGyOuUDzH0i8uMX6yhCMCNkGqe7zF+lM7fUy9str9fd /g/DiEtJoG6Pc6qgqPP0iEtqkXPy0Tezlkd22DWBlo4ZmxpKe5GjGVNbm37DKGmyBjIi mLHTZemQJdZVASdkwEQIyaXJ+ltGm0NnNoV7M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=kEuzr15lA+CS94104ZCTF3BXRW+8+Cec6EHawplRe71uUQseRusI+CYJ7B9zBoFjC3 5U7U4hlldQBIo1zl6U0eGN9z/6qbnL9xYKDv9AnDU6C9tehqjy16RwkROAXeR3N3Me2y x7ZiT6MFsVeXhbls6rdXC5Qto3IwWHhbaqw+Q= MIME-Version: 1.0 Received: by 10.204.160.90 with SMTP id m26mr4859599bkx.45.1280083994973; Sun, 25 Jul 2010 11:53:14 -0700 (PDT) Received: by 10.204.80.131 with HTTP; Sun, 25 Jul 2010 11:53:14 -0700 (PDT) Date: Sun, 25 Jul 2010 19:53:14 +0100 Message-ID: Subject: Re: [2.6.35-rc6 patch] direct I/O submission fixes v2 From: Daniel J Blueman To: Josef Bacik , Chris Mason Cc: Linux BTRFS 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]); Sun, 25 Jul 2010 18:53:21 +0000 (UTC) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1bff92a..bd7f940 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5652,15 +5652,15 @@ static void btrfs_submit_direct(int rw, struct bio *bio, struct inode *inode, ret = -ENOMEM; goto free_ordered; } - dip->csums = NULL; if (!skip_sum) { dip->csums = kmalloc(sizeof(u32) * bio->bi_vcnt, GFP_NOFS); if (!dip->csums) { ret = -ENOMEM; - goto free_ordered; + goto out_err; } - } + } else + dip->csums = NULL; dip->private = bio->bi_private;