Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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
This commit is contained in:
@@ -2509,6 +2509,11 @@ static void btrfs_read_locked_inode(struct inode *inode)
|
||||
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 @@ static void btrfs_read_locked_inode(struct inode *inode)
|
||||
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 @@ static void btrfs_read_locked_inode(struct inode *inode)
|
||||
|
||||
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 @@ static void btrfs_read_locked_inode(struct inode *inode)
|
||||
}
|
||||
|
||||
btrfs_free_path(path);
|
||||
inode_item = NULL;
|
||||
|
||||
switch (inode->i_mode & S_IFMT) {
|
||||
case S_IFREG:
|
||||
@@ -4520,6 +4528,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
|
||||
inode_tree_add(inode);
|
||||
|
||||
trace_btrfs_inode_new(inode);
|
||||
btrfs_set_inode_last_trans(trans, inode);
|
||||
|
||||
return inode;
|
||||
fail:
|
||||
|
Reference in New Issue
Block a user