diff options
-rw-r--r-- | fs/btrfs/tree-log.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 33eee256ee81..b1c2921f5bef 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -50,6 +50,9 @@ | |||
50 | static int __btrfs_log_inode(struct btrfs_trans_handle *trans, | 50 | static int __btrfs_log_inode(struct btrfs_trans_handle *trans, |
51 | struct btrfs_root *root, struct inode *inode, | 51 | struct btrfs_root *root, struct inode *inode, |
52 | int inode_only); | 52 | int inode_only); |
53 | static int link_to_fixup_dir(struct btrfs_trans_handle *trans, | ||
54 | struct btrfs_root *root, | ||
55 | struct btrfs_path *path, u64 objectid); | ||
53 | 56 | ||
54 | /* | 57 | /* |
55 | * tree logging is a special write ahead log used to make sure that | 58 | * tree logging is a special write ahead log used to make sure that |
@@ -638,8 +641,10 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, | |||
638 | inode = read_one_inode(root, location.objectid); | 641 | inode = read_one_inode(root, location.objectid); |
639 | BUG_ON(!inode); | 642 | BUG_ON(!inode); |
640 | 643 | ||
641 | btrfs_inc_nlink(inode); | 644 | ret = link_to_fixup_dir(trans, root, path, location.objectid); |
645 | BUG_ON(ret); | ||
642 | ret = btrfs_unlink_inode(trans, root, dir, inode, name, name_len); | 646 | ret = btrfs_unlink_inode(trans, root, dir, inode, name, name_len); |
647 | BUG_ON(ret); | ||
643 | kfree(name); | 648 | kfree(name); |
644 | 649 | ||
645 | iput(inode); | 650 | iput(inode); |