Lines Matching refs:pending_snapshot

797 	struct btrfs_pending_snapshot *pending_snapshot;  in create_snapshot()  local
810 pending_snapshot = kzalloc(sizeof(*pending_snapshot), GFP_KERNEL); in create_snapshot()
811 if (!pending_snapshot) in create_snapshot()
814 ret = get_anon_bdev(&pending_snapshot->anon_dev); in create_snapshot()
817 pending_snapshot->root_item = kzalloc(sizeof(struct btrfs_root_item), in create_snapshot()
819 pending_snapshot->path = btrfs_alloc_path(); in create_snapshot()
820 if (!pending_snapshot->root_item || !pending_snapshot->path) { in create_snapshot()
825 btrfs_init_block_rsv(&pending_snapshot->block_rsv, in create_snapshot()
836 &pending_snapshot->block_rsv, 8, in create_snapshot()
841 pending_snapshot->dentry = dentry; in create_snapshot()
842 pending_snapshot->root = root; in create_snapshot()
843 pending_snapshot->readonly = readonly; in create_snapshot()
844 pending_snapshot->dir = dir; in create_snapshot()
845 pending_snapshot->inherit = inherit; in create_snapshot()
854 list_add(&pending_snapshot->list, in create_snapshot()
862 ret = pending_snapshot->error; in create_snapshot()
866 ret = btrfs_orphan_cleanup(pending_snapshot->snap); in create_snapshot()
878 pending_snapshot->anon_dev = 0; in create_snapshot()
881 if (ret && pending_snapshot->snap) in create_snapshot()
882 pending_snapshot->snap->anon_dev = 0; in create_snapshot()
883 btrfs_put_root(pending_snapshot->snap); in create_snapshot()
884 btrfs_subvolume_release_metadata(root, &pending_snapshot->block_rsv); in create_snapshot()
886 if (pending_snapshot->anon_dev) in create_snapshot()
887 free_anon_bdev(pending_snapshot->anon_dev); in create_snapshot()
888 kfree(pending_snapshot->root_item); in create_snapshot()
889 btrfs_free_path(pending_snapshot->path); in create_snapshot()
890 kfree(pending_snapshot); in create_snapshot()