freebsd-skq/sys/fs
Konstantin Belousov 724ce55b5b While fixing the looping of a thread while devfs vnode is reclaimed,
r179247 introduced a possibility of devfs_allocv() returning spurious
ENOENT. If the vnode is selected by vnlru daemon for reclamation, then
devfs_allocv() can get ENOENT from vget() due to devfs_close() dropping
vnode lock around the call to cdevsw d_close method.

Use LK_RETRY in the vget() call, and do some part of the devfs_reclaim()
work in devfs_allocv(), clearing vp->v_data and de->de_vnode. Retry the
allocation of the vnode, now with de->de_vnode == NULL.

The check vp->v_data == NULL at the start of devfs_close() cannot be
affected by the change, since vnode lock must be held while VI_DOOMED
is set, and only dropped after the check.

Reported and tested by:	Kohji Okuno <okuno.kohji jp panasonic com>
Reviewed by:	attilio
MFC after:	3 weeks
2011-07-13 21:07:41 +00:00
..
cd9660 Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
coda Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs While fixing the looping of a thread while devfs vnode is reclaimed, 2011-07-13 21:07:41 +00:00
ext2fs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
fdescfs Linuxolator calls VOP_READDIR with ncookies pointer. Implement a 2011-04-09 21:40:48 +00:00
fifofs - Improve comments about locking of the "struct fifoinfo" which is a bit 2009-11-06 22:29:46 +00:00
hpfs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
msdosfs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
nfs Modify the new NFSv4 client so that it appends a file handle 2011-07-03 21:44:26 +00:00
nfsclient r222389 introduced a case where the NFSv4 client could 2011-07-13 00:48:36 +00:00
nfsserver Fix the new NFSv4 server so that it checks for VREAD_ACL when 2011-06-21 19:58:29 +00:00
ntfs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
nullfs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
nwfs In the VOP_PUTPAGES() implementations, change the default error from 2011-06-01 21:00:28 +00:00
portalfs Mfp4 CH=177274,177280,177284-177285,177297,177324-177325 2011-02-16 21:29:13 +00:00
procfs Add macro to test the sv_flags of any process. Change some places to test 2011-01-26 20:03:58 +00:00
pseudofs Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and 2010-08-20 19:46:50 +00:00
smbfs Make a comment more accurate. 2011-07-07 17:00:42 +00:00
tmpfs Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing this 2011-06-29 16:40:41 +00:00
udf Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
unionfs Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00