--- 0bc5776950612f7b4b8e6e0d7794d97b2c7f294b +++ 3359aff5aeba5fe068cce4fd0857d43e7aef7141 @@ -285,6 +285,10 @@ static noinline int create_subvol(struct inode_item->nbytes = cpu_to_le64(root->leafsize); inode_item->mode = cpu_to_le32(S_IFDIR | 0755); + root_item.flags = 0; + root_item.byte_limit = 0; + inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT); + btrfs_set_root_bytenr(&root_item, leaf->start); btrfs_set_root_generation(&root_item, trans->transid); btrfs_set_root_level(&root_item, 0);