inode.c (98509cfc5a6857bddcfe4b19a9539726655ec9bd) inode.c (49eb7e46d47ea72a9bd2a5f8cedb04f5159cc277)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 1173 unchanged lines hidden (view full) ---

1182 ret = -ENOENT;
1183 goto err;
1184 }
1185 ret = btrfs_delete_one_dir_name(trans, root, path, di);
1186 btrfs_release_path(root, path);
1187
1188 ret = btrfs_del_inode_ref_in_log(trans, root, name, name_len,
1189 inode, dir->i_ino);
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 1173 unchanged lines hidden (view full) ---

1182 ret = -ENOENT;
1183 goto err;
1184 }
1185 ret = btrfs_delete_one_dir_name(trans, root, path, di);
1186 btrfs_release_path(root, path);
1187
1188 ret = btrfs_del_inode_ref_in_log(trans, root, name, name_len,
1189 inode, dir->i_ino);
1190 BUG_ON(ret);
1190 BUG_ON(ret != 0 && ret != -ENOENT);
1191 if (ret != -ENOENT)
1192 BTRFS_I(dir)->log_dirty_trans = trans->transid;
1191
1192 ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
1193 dir, index);
1194 BUG_ON(ret);
1195err:
1196 btrfs_free_path(path);
1197 if (ret)
1198 goto out;

--- 586 unchanged lines hidden (view full) ---

1785
1786 bi->generation = 0;
1787 bi->last_trans = 0;
1788 bi->logged_trans = 0;
1789 bi->delalloc_bytes = 0;
1790 bi->disk_i_size = 0;
1791 bi->flags = 0;
1792 bi->index_cnt = (u64)-1;
1193
1194 ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
1195 dir, index);
1196 BUG_ON(ret);
1197err:
1198 btrfs_free_path(path);
1199 if (ret)
1200 goto out;

--- 586 unchanged lines hidden (view full) ---

1787
1788 bi->generation = 0;
1789 bi->last_trans = 0;
1790 bi->logged_trans = 0;
1791 bi->delalloc_bytes = 0;
1792 bi->disk_i_size = 0;
1793 bi->flags = 0;
1794 bi->index_cnt = (u64)-1;
1795 bi->log_dirty_trans = 0;
1793 extent_map_tree_init(&BTRFS_I(inode)->extent_tree, GFP_NOFS);
1794 extent_io_tree_init(&BTRFS_I(inode)->io_tree,
1795 inode->i_mapping, GFP_NOFS);
1796 extent_io_tree_init(&BTRFS_I(inode)->io_failure_tree,
1797 inode->i_mapping, GFP_NOFS);
1798 INIT_LIST_HEAD(&BTRFS_I(inode)->delalloc_inodes);
1799 btrfs_ordered_inode_tree_init(&BTRFS_I(inode)->ordered_tree);
1800 mutex_init(&BTRFS_I(inode)->csum_mutex);

--- 1949 unchanged lines hidden ---
1796 extent_map_tree_init(&BTRFS_I(inode)->extent_tree, GFP_NOFS);
1797 extent_io_tree_init(&BTRFS_I(inode)->io_tree,
1798 inode->i_mapping, GFP_NOFS);
1799 extent_io_tree_init(&BTRFS_I(inode)->io_failure_tree,
1800 inode->i_mapping, GFP_NOFS);
1801 INIT_LIST_HEAD(&BTRFS_I(inode)->delalloc_inodes);
1802 btrfs_ordered_inode_tree_init(&BTRFS_I(inode)->ordered_tree);
1803 mutex_init(&BTRFS_I(inode)->csum_mutex);

--- 1949 unchanged lines hidden ---