Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139469
b: refs/heads/master
c: a74ac32
h: refs/heads/master
i:
  139467: 790e3d9
v: v3
  • Loading branch information
Chris Mason committed Mar 24, 2009
1 parent 9ddedc9 commit 40a2ec2
Show file tree
Hide file tree
Showing 2 changed files with 12 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: a4b6e07d1a8a9b907e82b9acbf51a026fbb9301c
refs/heads/master: a74ac3220774d33db967088906dc3351829e2d3a
11 changes: 11 additions & 0 deletions trunk/fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,17 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
root, inode, inode->i_size,
BTRFS_EXTENT_DATA_KEY);
BUG_ON(ret);

/* if the nlink count is zero here, the iput
* will free the inode. We bump it to make
* sure it doesn't get freed until the link
* count fixup is done
*/
if (inode->i_nlink == 0) {
btrfs_inc_nlink(inode);
btrfs_update_inode(wc->trans,
root, inode);
}
iput(inode);
}
ret = link_to_fixup_dir(wc->trans, root,
Expand Down

0 comments on commit 40a2ec2

Please sign in to comment.