kernel - Fix pty clone vnode leak
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 13 Aug 2010 01:20:41 +0000 (18:20 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 13 Aug 2010 01:20:41 +0000 (18:20 -0700)
commitb80b4c328a74f1d0c2f262272a7170d10546d957
treecabe3c707abe198af585f59ca405adb4a057973f
parentee72f7a239ec0145be1cc05d2f20d5aeea4388a8
kernel - Fix pty clone vnode leak

* Any cloned devfs device (vn, tap, ptmx primarily) was leaving an extra
  vref on the related vnode, preventing the vnode from being recycled.

  This was due to devfs called vop_stdopen() but forgetting that
  vop_stdopen() will load the file pointer (fp), which devfs was also
  loading.  All devfs really needs to do is to replace fp->f_ops.

Reported-by: swildner
sys/vfs/devfs/devfs_vnops.c