mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Hide transient EBADF errors caused by the parallel revoke(2) or forced
unmount of devfs mounts, by restarting the failed syscall. When restarted, failing syscalls eventually either stop finding the node and returning ENOENT, or the vnode op vectors finally transition to the deadfs vop. The later return EIO or other error, more appropriate for the operation. Submitted by: bde Tested by: pho MFC after: 3 weeks
This commit is contained in:
parent
2f204e1fe4
commit
fb57d63e47
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293059
@ -244,18 +244,18 @@ devfs_populate_vp(struct vnode *vp)
|
||||
if (DEVFS_DMP_DROP(dmp)) {
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
devfs_unmount_final(dmp);
|
||||
return (EBADF);
|
||||
return (ERESTART);
|
||||
}
|
||||
if ((vp->v_iflag & VI_DOOMED) != 0) {
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
return (EBADF);
|
||||
return (ERESTART);
|
||||
}
|
||||
de = vp->v_data;
|
||||
KASSERT(de != NULL,
|
||||
("devfs_populate_vp: vp->v_data == NULL but vnode not doomed"));
|
||||
if ((de->de_flags & DE_DOOMED) != 0) {
|
||||
sx_xunlock(&dmp->dm_lock);
|
||||
return (EBADF);
|
||||
return (ERESTART);
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user