Mark our provider with G_PF_CANDELETE in the cases where this is actually

the case.
This commit is contained in:
Poul-Henning Kamp 2003-02-11 12:35:44 +00:00
parent eb3543e4cc
commit b3b3d1b7fe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110695

View File

@ -782,11 +782,14 @@ mdcreate_malloc(struct md_ioctl *mdio)
break;
}
}
if (!error) {
mdinit(sc);
} else
if (error) {
mddestroy(sc, NULL);
return (error);
return (error);
}
mdinit(sc);
if (!(mdio->md_options & MD_RESERVE))
sc->pp->flags |= G_PF_CANDELETE;
return (0);
}
@ -989,11 +992,14 @@ mdcreate_swap(struct md_ioctl *mdio, struct thread *td)
}
}
error = mdsetcred(sc, td->td_ucred);
if (error)
if (error) {
mddestroy(sc, td);
else
mdinit(sc);
return (error);
return (error);
}
mdinit(sc);
if (!(mdio->md_options & MD_RESERVE))
sc->pp->flags |= G_PF_CANDELETE;
return (0);
}
static int