freebsd-nq/sys/fs
Konstantin Belousov 8239a7a878 The tmpfs_alloc_vp() is used to instantiate vnode for the tmpfs node,
in particular, from the tmpfs_lookup VOP method.  If LK_NOWAIT is not
specified in the lkflags, the lookup is supposed to return an alive
vnode whenever the underlying node is valid.

Currently, the tmpfs_alloc_vp() returns ENOENT if the vnode attached
to node exists and is being reclaimed.  This causes spurious ENOENT
errors from lookup on tmpfs and corresponding random 'No such file'
failures from syscalls working with tmpfs files.

Fix this by waiting for the doomed vnode to be detached from the tmpfs
node if sleepable allocation is requested.

Note that filesystems which use vfs_hash.c, correctly handle the case
due to vfs_hash_get() looping when vget() returns ENOENT for sleepable
requests.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-08-05 18:53:59 +00:00
..
cd9660 - Add const-qualifiers to the arguments of isonum_*(). 2013-07-28 12:29:10 +00:00
deadfs The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively, 2012-09-13 13:05:45 +00:00
devfs make path matching in devfs rules consistent and sane (and safer) 2013-07-26 14:25:58 +00:00
ext2fs Add license for the half MD4 algorithm used in ext2_half_md4(). 2013-08-01 16:04:48 +00:00
fdescfs Fix several typos 2013-05-12 16:43:26 +00:00
fifofs I am comparing current pipe code with the one in 8.3-STABLE r236165, 2012-07-31 05:48:35 +00:00
fuse fuse: revert kernel_header update. 2013-07-24 20:21:29 +00:00
msdosfs The fsync(2) call should sync the vnode in such way that even after 2013-05-02 20:00:11 +00:00
nandfs - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
nfs The NFSv4 server incorrectly assumed that the high order words of 2013-07-20 22:35:32 +00:00
nfsclient Add support for host-based (Kerberos 5 service principal) initiator 2013-07-09 01:05:28 +00:00
nfsserver - Convert the bufobj lock to rwlock. 2013-05-31 00:43:41 +00:00
nullfs The tvp vnode on rename is usually unlinked. Drop the cached null 2013-07-04 19:01:18 +00:00
procfs Relax the vm object locking. Use a read lock. 2013-06-05 17:00:10 +00:00
pseudofs Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. 2012-11-09 18:02:25 +00:00
smbfs - Fix double frees/user after free. 2013-07-03 10:31:45 +00:00
tmpfs The tmpfs_alloc_vp() is used to instantiate vnode for the tmpfs node, 2013-08-05 18:53:59 +00:00
udf Add currently unused flag argument to the cluster_read(), 2013-03-14 20:28:26 +00:00
unionfs r16312 is not any longer real since many years (likely since when VFS 2012-11-19 22:43:45 +00:00