diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1180,8 +1180,8 @@ memcpy(oldname, fip->de_Name, 11); memcpy(fip->de_Name, toname, 11); /* update denode */ error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff); - MPASS(error == EJUSTRETURN); - error = createde(fip, tdip, NULL, tcnp); + if (error == EJUSTRETURN) + error = createde(fip, tdip, NULL, tcnp); if (error != 0) { memcpy(fip->de_Name, oldname, 11); goto unlock; @@ -1203,7 +1203,10 @@ MPASS(error == 0); error = removede(fdip, fip); if (error != 0) { - /* XXX should downgrade to ro here, fs is corrupt */ + printf("%s: removede %s %s err %d\n", + pmp->pm_mountp->mnt_stat.f_mntonname, + fdip->de_Name, fip->de_Name, error); + msdosfs_integrity_error(pmp); goto unlock; } if (!doingdirectory) { @@ -1237,7 +1240,10 @@ error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster, NOCRED, &bp); if (error != 0) { - /* XXX should downgrade to ro here, fs is corrupt */ + printf("%s: block read error %d while renaming dir\n", + pmp->pm_mountp->mnt_stat.f_mntonname, + error); + msdosfs_integrity_error(pmp); goto unlock; } dotdotp = (struct direntry *)bp->b_data + 1; @@ -1250,7 +1256,10 @@ if (DOINGASYNC(fvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { - /* XXX should downgrade to ro here, fs is corrupt */ + printf("%s: block write error %d while renaming dir\n", + pmp->pm_mountp->mnt_stat.f_mntonname, + error); + msdosfs_integrity_error(pmp); goto unlock; } }