svn commit: r220717 - stable/8/sys/fs/fdescfs

Konstantin Belousov kib at FreeBSD.org
Sat Apr 16 12:45:09 UTC 2011


Author: kib
Date: Sat Apr 16 12:45:09 2011
New Revision: 220717
URL: http://svn.freebsd.org/changeset/base/220717

Log:
  MFC r220506:
  Implement a workaround for fdescfs to not panic when ncookies is not NULL.
  
  PR:	kern/156177

Modified:
  stable/8/sys/fs/fdescfs/fdesc_vnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/fdescfs/fdesc_vnops.c
==============================================================================
--- stable/8/sys/fs/fdescfs/fdesc_vnops.c	Sat Apr 16 12:43:04 2011	(r220716)
+++ stable/8/sys/fs/fdescfs/fdesc_vnops.c	Sat Apr 16 12:45:09 2011	(r220717)
@@ -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)


More information about the svn-src-stable-8 mailing list