aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index a93934fc93bd..405439ca4c45 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1532,6 +1532,17 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
1532 root, inode, inode->i_size, 1532 root, inode, inode->i_size,
1533 BTRFS_EXTENT_DATA_KEY); 1533 BTRFS_EXTENT_DATA_KEY);
1534 BUG_ON(ret); 1534 BUG_ON(ret);
1535
1536 /* if the nlink count is zero here, the iput
1537 * will free the inode. We bump it to make
1538 * sure it doesn't get freed until the link
1539 * count fixup is done
1540 */
1541 if (inode->i_nlink == 0) {
1542 btrfs_inc_nlink(inode);
1543 btrfs_update_inode(wc->trans,
1544 root, inode);
1545 }
1535 iput(inode); 1546 iput(inode);
1536 } 1547 }
1537 ret = link_to_fixup_dir(wc->trans, root, 1548 ret = link_to_fixup_dir(wc->trans, root,