Author: kib
Date: Sat Apr  9 21:40:48 2011
New Revision: 220506
URL: http://svn.freebsd.org/changeset/base/220506

Log:
  Linuxolator calls VOP_READDIR with ncookies pointer. Implement a
  workaround for fdescfs to not panic when ncookies is not NULL, similar
  to the one committed as r152254, but simpler, due to fdescfs_readdir()
  not calling vfs_read_dirent().
  
  PR:   kern/156177
  MFC after:    1 week

Modified:
  head/sys/fs/fdescfs/fdesc_vnops.c

Modified: head/sys/fs/fdescfs/fdesc_vnops.c
==============================================================================
--- head/sys/fs/fdescfs/fdesc_vnops.c   Sat Apr  9 19:07:44 2011        
(r220505)
+++ head/sys/fs/fdescfs/fdesc_vnops.c   Sat Apr  9 21:40:48 2011        
(r220506)
@@ -500,16 +500,12 @@ fdesc_readdir(ap)
        struct dirent *dp = &d;
        int error, i, off, fcnt;
 
-       /*
-        * We don't allow exporting fdesc mounts, and currently local
-        * requests do not need cookies.
-        */
-       if (ap->a_ncookies)
-               panic("fdesc_readdir: not hungry");
-
        if (VTOFDESC(ap->a_vp)->fd_type != Froot)
                panic("fdesc_readdir: not dir");
 
+       if (ap->a_ncookies != NULL)
+               *ap->a_ncookies = 0;
+
        off = (int)uio->uio_offset;
        if (off != uio->uio_offset || off < 0 || (u_int)off % UIO_MX != 0 ||
            uio->uio_resid < UIO_MX)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to