aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r--fs/btrfs/dir-item.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index 125094617fe8..e4f30090d640 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -96,6 +96,7 @@ int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,
96 btrfs_set_dir_item_key(leaf, dir_item, &disk_key); 96 btrfs_set_dir_item_key(leaf, dir_item, &disk_key);
97 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR); 97 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR);
98 btrfs_set_dir_name_len(leaf, dir_item, name_len); 98 btrfs_set_dir_name_len(leaf, dir_item, name_len);
99 btrfs_set_dir_transid(leaf, dir_item, trans->transid);
99 btrfs_set_dir_data_len(leaf, dir_item, data_len); 100 btrfs_set_dir_data_len(leaf, dir_item, data_len);
100 name_ptr = (unsigned long)(dir_item + 1); 101 name_ptr = (unsigned long)(dir_item + 1);
101 data_ptr = (unsigned long)((char *)name_ptr + name_len); 102 data_ptr = (unsigned long)((char *)name_ptr + name_len);
@@ -142,6 +143,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
142 btrfs_set_dir_type(leaf, dir_item, type); 143 btrfs_set_dir_type(leaf, dir_item, type);
143 btrfs_set_dir_data_len(leaf, dir_item, 0); 144 btrfs_set_dir_data_len(leaf, dir_item, 0);
144 btrfs_set_dir_name_len(leaf, dir_item, name_len); 145 btrfs_set_dir_name_len(leaf, dir_item, name_len);
146 btrfs_set_dir_transid(leaf, dir_item, trans->transid);
145 name_ptr = (unsigned long)(dir_item + 1); 147 name_ptr = (unsigned long)(dir_item + 1);
146 148
147 write_extent_buffer(leaf, name, name_ptr, name_len); 149 write_extent_buffer(leaf, name, name_ptr, name_len);
@@ -169,6 +171,7 @@ second_insert:
169 btrfs_set_dir_type(leaf, dir_item, type); 171 btrfs_set_dir_type(leaf, dir_item, type);
170 btrfs_set_dir_data_len(leaf, dir_item, 0); 172 btrfs_set_dir_data_len(leaf, dir_item, 0);
171 btrfs_set_dir_name_len(leaf, dir_item, name_len); 173 btrfs_set_dir_name_len(leaf, dir_item, name_len);
174 btrfs_set_dir_transid(leaf, dir_item, trans->transid);
172 name_ptr = (unsigned long)(dir_item + 1); 175 name_ptr = (unsigned long)(dir_item + 1);
173 write_extent_buffer(leaf, name, name_ptr, name_len); 176 write_extent_buffer(leaf, name, name_ptr, name_len);
174 btrfs_mark_buffer_dirty(leaf); 177 btrfs_mark_buffer_dirty(leaf);