Mark our provider with G_PF_CANDELETE in the cases where this is actually
the case.
This commit is contained in:
parent
eb3543e4cc
commit
b3b3d1b7fe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110695
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user