Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Jun 2011 20:32:14 +0000 (13:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Jun 2011 20:32:14 +0000 (13:32 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  btrfs: fix inconsonant inode information
  Btrfs: make sure to update total_bitmaps when freeing cache V3
  Btrfs: fix type mismatch in find_free_extent()
  Btrfs: make sure to record the transid in new inodes

1  2 
fs/btrfs/inode.c

diff --combined fs/btrfs/inode.c
index 0a9b10c5b0a7458a6f2aca7a195c1980e1b88bb8,447612d3a16af70e78e44d8d357ca8977267eef9..d340f63d8f07b2cf7c0e087fdf92ba384e31662e
@@@ -2509,6 -2509,11 +2509,11 @@@ static void btrfs_read_locked_inode(str
        int maybe_acls;
        u32 rdev;
        int ret;
+       bool filled = false;
+       ret = btrfs_fill_inode(inode, &rdev);
+       if (!ret)
+               filled = true;
  
        path = btrfs_alloc_path();
        BUG_ON(!path);
                goto make_bad;
  
        leaf = path->nodes[0];
+       if (filled)
+               goto cache_acl;
        inode_item = btrfs_item_ptr(leaf, path->slots[0],
                                    struct btrfs_inode_item);
        if (!leaf->map_token)
  
        BTRFS_I(inode)->index_cnt = (u64)-1;
        BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item);
+ cache_acl:
        /*
         * try to precache a NULL acl entry for files that don't have
         * any xattrs or acls
        }
  
        btrfs_free_path(path);
-       inode_item = NULL;
  
        switch (inode->i_mode & S_IFMT) {
        case S_IFREG:
@@@ -4291,7 -4299,7 +4299,7 @@@ int btrfs_write_inode(struct inode *ino
   * FIXME, needs more benchmarking...there are no reasons other than performance
   * to keep or drop this code.
   */
 -void btrfs_dirty_inode(struct inode *inode)
 +void btrfs_dirty_inode(struct inode *inode, int flags)
  {
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_trans_handle *trans;
@@@ -4520,6 -4528,7 +4528,7 @@@ static struct inode *btrfs_new_inode(st
        inode_tree_add(inode);
  
        trace_btrfs_inode_new(inode);
+       btrfs_set_inode_last_trans(trans, inode);
  
        return inode;
  fail: