Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253089
b: refs/heads/master
c: d90c732
h: refs/heads/master
i:
  253087: 7e22695
v: v3
  • Loading branch information
Josef Bacik committed May 23, 2011
1 parent 68da36c commit 8cd282d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 207dde8289d9b005b665cb9d8d2bb9464256101d
refs/heads/master: d90c732122a1f6d0efe388a8a204f67f144b2eb3
12 changes: 12 additions & 0 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,7 @@ static void btrfs_read_locked_inode(struct inode *inode)

path = btrfs_alloc_path();
BUG_ON(!path);
path->leave_spinning = 1;
memcpy(&location, &BTRFS_I(inode)->location, sizeof(location));

ret = btrfs_lookup_inode(NULL, root, path, &location, 0);
Expand All @@ -2502,6 +2503,12 @@ static void btrfs_read_locked_inode(struct inode *inode)
leaf = path->nodes[0];
inode_item = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_inode_item);
if (!leaf->map_token)
map_private_extent_buffer(leaf, (unsigned long)inode_item,
sizeof(struct btrfs_inode_item),
&leaf->map_token, &leaf->kaddr,
&leaf->map_start, &leaf->map_len,
KM_USER1);

inode->i_mode = btrfs_inode_mode(leaf, inode_item);
inode->i_nlink = btrfs_inode_nlink(leaf, inode_item);
Expand Down Expand Up @@ -2539,6 +2546,11 @@ static void btrfs_read_locked_inode(struct inode *inode)
if (!maybe_acls)
cache_no_acl(inode);

if (leaf->map_token) {
unmap_extent_buffer(leaf, leaf->map_token, KM_USER1);
leaf->map_token = NULL;
}

btrfs_free_path(path);
inode_item = NULL;

Expand Down

0 comments on commit 8cd282d

Please sign in to comment.