From: Linus Torvalds Date: Mon, 27 Jun 2011 20:32:14 +0000 (-0700) Subject: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs... X-Git-Tag: v3.0-rc5~25 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=af4087e0e682df12bdffec5cfafc2fec9208716e;hp=-c Merge branch 'for-linus' of git://git./linux/kernel/git/mason/btrfs-unstable * '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 --- af4087e0e682df12bdffec5cfafc2fec9208716e diff --combined fs/btrfs/inode.c index 0a9b10c5b0a7,447612d3a16a..d340f63d8f07 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@@ -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); @@@ -2520,6 -2525,10 +2525,10 @@@ 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) @@@ -2556,7 -2565,7 +2565,7 @@@ 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 @@@ -2572,7 -2581,6 +2581,6 @@@ } 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: