Lines Matching refs:pending_snapshot

708 	struct btrfs_pending_snapshot *pending_snapshot;  in create_snapshot()  local
734 pending_snapshot = kzalloc(sizeof(*pending_snapshot), GFP_KERNEL); in create_snapshot()
735 if (!pending_snapshot) in create_snapshot()
738 ret = get_anon_bdev(&pending_snapshot->anon_dev); in create_snapshot()
741 pending_snapshot->root_item = kzalloc(sizeof(struct btrfs_root_item), in create_snapshot()
743 pending_snapshot->path = btrfs_alloc_path(); in create_snapshot()
744 if (!pending_snapshot->root_item || !pending_snapshot->path) { in create_snapshot()
749 block_rsv = &pending_snapshot->block_rsv; in create_snapshot()
763 pending_snapshot->dentry = dentry; in create_snapshot()
764 pending_snapshot->root = root; in create_snapshot()
765 pending_snapshot->readonly = readonly; in create_snapshot()
766 pending_snapshot->dir = BTRFS_I(dir); in create_snapshot()
767 pending_snapshot->inherit = inherit; in create_snapshot()
782 trans->pending_snapshot = pending_snapshot; in create_snapshot()
788 ret = pending_snapshot->error; in create_snapshot()
792 ret = btrfs_orphan_cleanup(pending_snapshot->snap); in create_snapshot()
804 pending_snapshot->anon_dev = 0; in create_snapshot()
807 if (ret && pending_snapshot->snap) in create_snapshot()
808 pending_snapshot->snap->anon_dev = 0; in create_snapshot()
809 btrfs_put_root(pending_snapshot->snap); in create_snapshot()
814 if (pending_snapshot->anon_dev) in create_snapshot()
815 free_anon_bdev(pending_snapshot->anon_dev); in create_snapshot()
816 kfree(pending_snapshot->root_item); in create_snapshot()
817 btrfs_free_path(pending_snapshot->path); in create_snapshot()
818 kfree(pending_snapshot); in create_snapshot()