diff --git a/src/vol/namei_ops.c b/src/vol/namei_ops.c index 498c9bb806..4b4c05ae10 100644 --- a/src/vol/namei_ops.c +++ b/src/vol/namei_ops.c @@ -1581,6 +1581,7 @@ convertVolumeInfo(int fdr, int fdw, afs_uint32 vid) vd.id = vd.parentId; vd.type = RWVOL; vd.dontSalvage = 0; + vd.inUse = 0; vd.uniquifier += 5000; /* just in case there are still file copies from * the old RW volume around */ p = strrchr(vd.name, '.'); @@ -1807,8 +1808,10 @@ namei_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId) return EIO; } close(fd); + (void)afs_snprintf(headername, sizeof headername, VFORMAT, afs_printable_uint32_lu(volumeId)); + (void)afs_snprintf(oldpath, sizeof oldpath, "%s/%s", pname, headername); if (unlink(oldpath) < 0) { - Log("1 namei_ConvertROtoRWvolume: Couldn't unlink RO header, error = %d\n", error); + Log("1 namei_ConvertROtoRWvolume: Couldn't unlink RO header, error = %d\n", errno); } FSYNC_VolOp(volumeId, pname, FSYNC_VOL_DONE, 0, NULL); FSYNC_VolOp(h.id, pname, FSYNC_VOL_ON, 0, NULL);