From patchwork Tue Sep 7 14:18:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 160641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o87EIO5H025911 for ; Tue, 7 Sep 2010 14:18:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756638Ab0IGOS3 (ORCPT ); Tue, 7 Sep 2010 10:18:29 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:56187 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152Ab0IGOS3 convert rfc822-to-8bit (ORCPT ); Tue, 7 Sep 2010 10:18:29 -0400 Received: by pxi10 with SMTP id 10so1328761pxi.19 for ; Tue, 07 Sep 2010 07:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ohohlMsbUgdl1Bhm7FuaRHokY+bmAtN2ayEAmWAh9jM=; b=vlOPIcKsAC0mETKKENA3LUvMHqaSHQtZWAGzrNuzZEbaYXnE9wtKyXJJBN9vREz2pG yKGvp2bPdA5BNlPnp/oKv3RT/1WpkHu+luNX63ZwiJp2frJOZpvbQlXP7r5I6sQp02FP CbONCLeMwYTCSFYgBN7mJ9mx9gkKXExsIaDVg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JAtYVXHWCEKDcsF8a9z2Bi1mdnGj+VqnGAl5y714rgpZw8/TL67N5OEgyYYOjSFaSg +Kw0tagtOUjH7AxsngbHOnPqX6B6UykcrvntOmhagd7f1hS1Ihkag4EzZEFLXHClDe61 hYPEUuUZenfisIiYisGzOGQuv+lwlLZjLmfrw= MIME-Version: 1.0 Received: by 10.114.130.20 with SMTP id c20mr2923959wad.104.1283869108678; Tue, 07 Sep 2010 07:18:28 -0700 (PDT) Received: by 10.231.206.78 with HTTP; Tue, 7 Sep 2010 07:18:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Sep 2010 15:18:28 +0100 Message-ID: Subject: [2.6.35-rc6 patch] direct I/O submission fixes v2 From: Daniel J Blueman To: Chris Mason Cc: Linux BTRFS , Josef Bacik 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 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Sep 2010 14:18:48 +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;