Hello! Correct "ptyfs_readdir" for multi mount points use.
ptyfs.h | 1 + ptyfs_subr.c | 3 +-- ptyfs_vnops.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Ilya.
Index: fs/ptyfs/ptyfs.h =================================================================== RCS file: /cvsil/nbcur/src/sys/fs/ptyfs/ptyfs.h,v retrieving revision 1.4 diff -u -r1.4 ptyfs.h --- fs/ptyfs/ptyfs.h 19 Mar 2014 04:53:36 -0000 1.4 +++ fs/ptyfs/ptyfs.h 21 Mar 2014 09:29:12 -0000 @@ -148,6 +148,7 @@ #define PTYFSTOV(ptyfs) ((ptyfs)->ptyfs_vnode) int ptyfs_freevp(struct vnode *); +struct vnode *ptyfs_used_get(ptyfstype, int, struct mount *, int); int ptyfs_allocvp(struct mount *, struct vnode **, ptyfstype, int, struct lwp *); void ptyfs_hashinit(void); Index: fs/ptyfs/ptyfs_subr.c =================================================================== RCS file: /cvsil/nbcur/src/sys/fs/ptyfs/ptyfs_subr.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ptyfs_subr.c --- fs/ptyfs/ptyfs_subr.c 4 Mar 2014 18:16:03 -0000 1.1.1.1 +++ fs/ptyfs/ptyfs_subr.c 21 Mar 2014 09:29:12 -0000 @@ -105,7 +105,6 @@ static void ptyfs_hashins(struct ptyfsnode *); static void ptyfs_hashrem(struct ptyfsnode *); -static struct vnode *ptyfs_used_get(ptyfstype, int, struct mount *, int); static struct ptyfsnode *ptyfs_free_get(ptyfstype, int, struct lwp *); static void ptyfs_rehash(kmutex_t *, struct ptyfs_hashhead **, @@ -186,7 +185,7 @@ * allocate a ptyfsnode/vnode pair. the vnode is * referenced, and locked. * - * the pid, ptyfs_type, and mount point uniquely + * the pty, ptyfs_type, and mount point uniquely * identify a ptyfsnode. the mount point is needed * because someone might mount this filesystem * twice. Index: fs/ptyfs/ptyfs_vnops.c =================================================================== RCS file: /cvsil/nbcur/src/sys/fs/ptyfs/ptyfs_vnops.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ptyfs_vnops.c --- fs/ptyfs/ptyfs_vnops.c 4 Mar 2014 18:16:03 -0000 1.1.1.1 +++ fs/ptyfs/ptyfs_vnops.c 21 Mar 2014 09:29:12 -0000 @@ -711,7 +711,7 @@ } for (; uio->uio_resid >= UIO_MX && i < npty; i++) { /* check for used ptys */ - if (pty_isfree(i - 2, 1)) + if (ptyfs_used_get(PTYFSptc, i - 2, vp->v_mount, 0) == NULL) continue; dp->d_fileno = PTYFS_FILENO(i - 2, PTYFSpts);