]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Aug 2009 02:03:09 +0000 (19:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Aug 2009 02:03:09 +0000 (19:03 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: fix balancing oops when invalidate_inode_pages2 returns EBUSY
  Btrfs: correct error-handling zlib error handling
  Btrfs: remove superfluous NULL pointer check in btrfs_rename()
  Btrfs: make sure the async caching thread advances the key
  Btrfs: fix btrfs_remove_from_free_space corner case

1  2 
fs/btrfs/inode.c

diff --combined fs/btrfs/inode.c
index 56fe83fa60c445d365f4339d1aa472cf875490d3,04b53b5ebe59227936865634e2a03184a671db8e..272b9b2bea86de6f4aa1fc3182ae616bf5238dbf
@@@ -26,6 -26,7 +26,6 @@@
  #include <linux/time.h>
  #include <linux/init.h>
  #include <linux/string.h>
 -#include <linux/smp_lock.h>
  #include <linux/backing-dev.h>
  #include <linux/mpage.h>
  #include <linux/swap.h>
@@@ -2121,8 -2122,10 +2121,8 @@@ static void btrfs_read_locked_inode(str
         * any xattrs or acls
         */
        maybe_acls = acls_after_inode_item(leaf, path->slots[0], inode->i_ino);
 -      if (!maybe_acls) {
 -              BTRFS_I(inode)->i_acl = NULL;
 -              BTRFS_I(inode)->i_default_acl = NULL;
 -      }
 +      if (!maybe_acls)
 +              cache_no_acl(inode);
  
        BTRFS_I(inode)->block_group = btrfs_find_block_group(root, 0,
                                                alloc_group_block, 0);
@@@ -2319,6 -2322,7 +2319,6 @@@ err
        btrfs_update_inode(trans, root, dir);
        btrfs_drop_nlink(inode);
        ret = btrfs_update_inode(trans, root, inode);
 -      dir->i_sb->s_dirt = 1;
  out:
        return ret;
  }
@@@ -2802,6 -2806,7 +2802,6 @@@ error
                                      pending_del_nr);
        }
        btrfs_free_path(path);
 -      inode->i_sb->s_dirt = 1;
        return ret;
  }
  
@@@ -3138,6 -3143,9 +3138,6 @@@ static noinline void init_btrfs_i(struc
  {
        struct btrfs_inode *bi = BTRFS_I(inode);
  
 -      bi->i_acl = BTRFS_ACL_NOT_CACHED;
 -      bi->i_default_acl = BTRFS_ACL_NOT_CACHED;
 -
        bi->generation = 0;
        bi->sequence = 0;
        bi->last_trans = 0;
@@@ -3761,6 -3769,7 +3761,6 @@@ static int btrfs_mknod(struct inode *di
                init_special_inode(inode, inode->i_mode, rdev);
                btrfs_update_inode(trans, root, inode);
        }
 -      dir->i_sb->s_dirt = 1;
        btrfs_update_inode_block_group(trans, inode);
        btrfs_update_inode_block_group(trans, dir);
  out_unlock:
@@@ -3825,6 -3834,7 +3825,6 @@@ static int btrfs_create(struct inode *d
                inode->i_op = &btrfs_file_inode_operations;
                BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
        }
 -      dir->i_sb->s_dirt = 1;
        btrfs_update_inode_block_group(trans, inode);
        btrfs_update_inode_block_group(trans, dir);
  out_unlock:
@@@ -3871,6 -3881,7 +3871,6 @@@ static int btrfs_link(struct dentry *ol
        if (err)
                drop_inode = 1;
  
 -      dir->i_sb->s_dirt = 1;
        btrfs_update_inode_block_group(trans, dir);
        err = btrfs_update_inode(trans, root, inode);
  
@@@ -3952,6 -3963,7 +3952,6 @@@ static int btrfs_mkdir(struct inode *di
  
        d_instantiate(dentry, inode);
        drop_on_err = 0;
 -      dir->i_sb->s_dirt = 1;
        btrfs_update_inode_block_group(trans, inode);
        btrfs_update_inode_block_group(trans, dir);
  
@@@ -4635,6 -4647,8 +4635,6 @@@ struct inode *btrfs_alloc_inode(struct 
        ei->last_trans = 0;
        ei->logged_trans = 0;
        btrfs_ordered_inode_tree_init(&ei->ordered_tree);
 -      ei->i_acl = BTRFS_ACL_NOT_CACHED;
 -      ei->i_default_acl = BTRFS_ACL_NOT_CACHED;
        INIT_LIST_HEAD(&ei->i_orphan);
        INIT_LIST_HEAD(&ei->ordered_operations);
        return &ei->vfs_inode;
@@@ -4648,6 -4662,13 +4648,6 @@@ void btrfs_destroy_inode(struct inode *
        WARN_ON(!list_empty(&inode->i_dentry));
        WARN_ON(inode->i_data.nrpages);
  
 -      if (BTRFS_I(inode)->i_acl &&
 -          BTRFS_I(inode)->i_acl != BTRFS_ACL_NOT_CACHED)
 -              posix_acl_release(BTRFS_I(inode)->i_acl);
 -      if (BTRFS_I(inode)->i_default_acl &&
 -          BTRFS_I(inode)->i_default_acl != BTRFS_ACL_NOT_CACHED)
 -              posix_acl_release(BTRFS_I(inode)->i_default_acl);
 -
        /*
         * Make sure we're properly removed from the ordered operation
         * lists.
@@@ -4785,8 -4806,7 +4785,7 @@@ static int btrfs_rename(struct inode *o
         * and the replacement file is large.  Start IO on it now so
         * we don't add too much work to the end of the transaction
         */
-       if (new_inode && old_inode && S_ISREG(old_inode->i_mode) &&
-           new_inode->i_size &&
+       if (new_inode && S_ISREG(old_inode->i_mode) && new_inode->i_size &&
            old_inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
                filemap_flush(old_inode->i_mapping);
  
@@@ -4971,6 -4991,7 +4970,6 @@@ static int btrfs_symlink(struct inode *
                inode->i_op = &btrfs_file_inode_operations;
                BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
        }
 -      dir->i_sb->s_dirt = 1;
        btrfs_update_inode_block_group(trans, inode);
        btrfs_update_inode_block_group(trans, dir);
        if (drop_inode)