Author: kib
Date: Sat Jan 2 20:29:28 2016
New Revision: 293059
URL: https://svnweb.freebsd.org/changeset/base/293059
Log:
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
Modified:
head/sys/fs/devfs/devfs_vnops.c
Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c Sat Jan 2 19:34:37 2016
(r293058)
+++ head/sys/fs/devfs/devfs_vnops.c Sat Jan 2 20:29:28 2016
(r293059)
@@ -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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"