Don't panic if owner has vanished before reply
This commit is contained in:
parent
bd6944ea49
commit
902e0e27e0
@ -777,18 +777,18 @@ int status;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The filp must be busy waiting for a reply. */
|
/* Is the filp still in use and busy waiting for a reply? The owner might
|
||||||
assert(f->filp_select_flags & FSF_BUSY);
|
* have vanished before the driver was able to reply. */
|
||||||
assert(f->filp_count >= 1); /* There should be at least one owner */
|
if (f->filp_count >= 1 && (f->filp_select_flags & FSF_BUSY)) {
|
||||||
|
/* Find vnode and check we got a reply from the device we expected */
|
||||||
/* Find vnode and check we got a reply from the device we expected */
|
vp = f->filp_vno;
|
||||||
vp = f->filp_vno;
|
assert(vp != NULL);
|
||||||
assert(vp != NULL);
|
assert((vp->v_mode & I_TYPE) == I_CHAR_SPECIAL); /* Must be char. special */
|
||||||
assert((vp->v_mode & I_TYPE) == I_CHAR_SPECIAL); /* Must be char. special */
|
if (vp->v_sdev != dev) {
|
||||||
if (vp->v_sdev != dev) {
|
printf("VFS (%s:%d): expected reply from dev %d not %d\n",
|
||||||
printf("VFS (%s:%d): expected reply from dev %d not %d\n",
|
vp->v_sdev, dev);
|
||||||
vp->v_sdev, dev);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No longer waiting for a reply from this device */
|
/* No longer waiting for a reply from this device */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user