diff options
author | kib <kib@FreeBSD.org> | 2016-01-02 20:29:28 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-01-02 20:29:28 +0000 |
commit | ae62b8f9327ee28b5fac41c6299b0e79be82dd48 (patch) | |
tree | b6e9123915ace6628f75652a2bb9c0bda4c860a6 /sys/fs | |
parent | 67b3e73120621301aec086ea4652c7c2c0dae94b (diff) | |
download | FreeBSD-src-ae62b8f9327ee28b5fac41c6299b0e79be82dd48.zip FreeBSD-src-ae62b8f9327ee28b5fac41c6299b0e79be82dd48.tar.gz |
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
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 44a15902..8a6b0c5 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -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); |