diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 89196911b8..7f7aaa6fb1 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -772,13 +772,17 @@ VolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId, salv_vp = originalvp; #endif - newvp = - VCreateVolume(&error, originalvp->partition->name, newId, - V_parentId(originalvp)); - if (error) { - Log("1 Volser: Clone: Couldn't create new volume; clone aborted\n"); - newvp = (Volume *) 0; - goto fail; + if (purgeId == newId) { + newvp = purgevp; + } else { + newvp = + VCreateVolume(&error, originalvp->partition->name, newId, + V_parentId(originalvp)); + if (error) { + Log("1 Volser: Clone: Couldn't create new volume; clone aborted\n"); + newvp = (Volume *) 0; + goto fail; + } } if (newType == readonlyVolume) V_cloneId(originalvp) = newId;