mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Resolve Coda mount failing because Coda failed to match the device
operations. But we don't have to, if we find the coda_mntinfo structure for this device in our linked list, we know the device is good. Submitted by: Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith)
This commit is contained in:
parent
7263babb85
commit
934030b2c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171375
@ -152,19 +152,15 @@ coda_mount(struct mount *vfsp, struct thread *td)
|
|||||||
vrele(dvp);
|
vrele(dvp);
|
||||||
NDFREE(&ndp, NDF_ONLY_PNBUF);
|
NDFREE(&ndp, NDF_ONLY_PNBUF);
|
||||||
|
|
||||||
/*
|
|
||||||
* See if the device table matches our expectations.
|
|
||||||
*/
|
|
||||||
if (dev->si_devsw->d_open != vc_nb_open)
|
|
||||||
{
|
|
||||||
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
|
||||||
return(ENXIO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the mount record and link it to the vfs struct
|
* Initialize the mount record and link it to the vfs struct
|
||||||
*/
|
*/
|
||||||
mi = dev2coda_mntinfo(dev);
|
mi = dev2coda_mntinfo(dev);
|
||||||
|
if (!mi) {
|
||||||
|
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
||||||
|
printf("Coda mount: %s is not a cfs device\n", from);
|
||||||
|
return(ENXIO);
|
||||||
|
}
|
||||||
|
|
||||||
if (!VC_OPEN(&mi->mi_vcomm)) {
|
if (!VC_OPEN(&mi->mi_vcomm)) {
|
||||||
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
||||||
|
@ -152,19 +152,15 @@ coda_mount(struct mount *vfsp, struct thread *td)
|
|||||||
vrele(dvp);
|
vrele(dvp);
|
||||||
NDFREE(&ndp, NDF_ONLY_PNBUF);
|
NDFREE(&ndp, NDF_ONLY_PNBUF);
|
||||||
|
|
||||||
/*
|
|
||||||
* See if the device table matches our expectations.
|
|
||||||
*/
|
|
||||||
if (dev->si_devsw->d_open != vc_nb_open)
|
|
||||||
{
|
|
||||||
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
|
||||||
return(ENXIO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the mount record and link it to the vfs struct
|
* Initialize the mount record and link it to the vfs struct
|
||||||
*/
|
*/
|
||||||
mi = dev2coda_mntinfo(dev);
|
mi = dev2coda_mntinfo(dev);
|
||||||
|
if (!mi) {
|
||||||
|
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
||||||
|
printf("Coda mount: %s is not a cfs device\n", from);
|
||||||
|
return(ENXIO);
|
||||||
|
}
|
||||||
|
|
||||||
if (!VC_OPEN(&mi->mi_vcomm)) {
|
if (!VC_OPEN(&mi->mi_vcomm)) {
|
||||||
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
MARK_INT_FAIL(CODA_MOUNT_STATS);
|
||||||
|
Loading…
Reference in New Issue
Block a user