From patchwork Thu Jan 7 21:29:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Hirte X-Patchwork-Id: 71659 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o07LUDvV015704 for ; Thu, 7 Jan 2010 21:30:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089Ab0AGV3j (ORCPT ); Thu, 7 Jan 2010 16:29:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753570Ab0AGV3i (ORCPT ); Thu, 7 Jan 2010 16:29:38 -0500 Received: from mail.fem.tu-ilmenau.de ([141.24.101.79]:49173 "EHLO mail.fem.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754048Ab0AGV3h (ORCPT ); Thu, 7 Jan 2010 16:29:37 -0500 Received: from datengrab.localnet (erft-4d07d869.pool.mediaWays.net [77.7.216.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.fem.tu-ilmenau.de (Postfix) with ESMTPSA id DEDD161C3; Thu, 7 Jan 2010 22:29:35 +0100 (CET) From: Johannes Hirte To: Chris Mason Subject: [btrfs] kernel BUG at include/linux/spinlock.h:376! Date: Thu, 7 Jan 2010 22:29:32 +0100 User-Agent: KMail/1.13.0 (Linux/2.6.33-rc2-00302-gc5974b8-dirty; KDE/4.3.85; x86_64; ; ) Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-Id: <201001072229.33976.johannes.hirte@fem.tu-ilmenau.de> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 2e9e699..3a3a96d 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -111,13 +111,15 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans, switch (type) { case ACL_TYPE_ACCESS: - mode = inode->i_mode; - ret = posix_acl_equiv_mode(acl, &mode); - if (ret < 0) - return ret; - ret = 0; - inode->i_mode = mode; name = POSIX_ACL_XATTR_ACCESS; + if (acl) { + mode = inode->i_mode; + ret = posix_acl_equiv_mode(acl, &mode); + if (ret < 0) + return ret; + ret = 0; + inode->i_mode = mode; + } break; case ACL_TYPE_DEFAULT: if (!S_ISDIR(inode->i_mode)) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c4bc570..654f702 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -679,7 +679,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans, if (!cur) { cur = read_tree_block(root, blocknr, blocksize, gen); - } else if (!uptodate) { + } else { btrfs_read_buffer(cur, gen); } } diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index a972868..ed3e4a2 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3281,8 +3281,10 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) return -ENOMEM; path = btrfs_alloc_path(); - if (!path) + if (!path) { + kfree(cluster); return -ENOMEM; + } rc->extents_found = 0; rc->extents_skipped = 0; diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 198cff2..220dad5 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2649,8 +2649,10 @@ again: em = lookup_extent_mapping(em_tree, logical, *length); read_unlock(&em_tree->lock); - if (!em && unplug_page) + if (!em && unplug_page) { + kfree(multi); return 0; + } if (!em) { printk(KERN_CRIT "unable to find logical %llu len %llu\n",