Don't panic if owner has vanished before reply

This commit is contained in:
Thomas Veerman 2011-07-15 14:11:34 +00:00
parent bd6944ea49
commit 902e0e27e0

View File

@ -777,10 +777,9 @@ int status;
return;
}
/* The filp must be busy waiting for a reply. */
assert(f->filp_select_flags & FSF_BUSY);
assert(f->filp_count >= 1); /* There should be at least one owner */
/* Is the filp still in use and busy waiting for a reply? The owner might
* have vanished before the driver was able to reply. */
if (f->filp_count >= 1 && (f->filp_select_flags & FSF_BUSY)) {
/* Find vnode and check we got a reply from the device we expected */
vp = f->filp_vno;
assert(vp != NULL);
@ -790,6 +789,7 @@ int status;
vp->v_sdev, dev);
return;
}
}
/* No longer waiting for a reply from this device */
f->filp_select_flags &= ~FSF_BUSY;