svn commit: r189302 - head/sys/fs/udf

Andriy Gapon avg at FreeBSD.org
Tue Mar 3 05:10:26 PST 2009


Author: avg
Date: Tue Mar  3 13:10:25 2009
New Revision: 189302
URL: http://svn.freebsd.org/changeset/base/189302

Log:
  udf_readdir: do not advance offset if entry can not be uio-ed
  
  Previosly readdir missed some directory entries because there was
  no space for them in current uio but directory stream offset
  was advanced nevertheless.
  jhb has discoved the issue and provided a test-case.
  
  Reviewed by:	bde
  Approved by:	jhb (mentor)

Modified:
  head/sys/fs/udf/udf_vnops.c

Modified: head/sys/fs/udf/udf_vnops.c
==============================================================================
--- head/sys/fs/udf/udf_vnops.c	Tue Mar  3 11:57:29 2009	(r189301)
+++ head/sys/fs/udf/udf_vnops.c	Tue Mar  3 13:10:25 2009	(r189302)
@@ -859,11 +859,11 @@ udf_readdir(struct vop_readdir_args *a)
 		}
 		if (error)
 			break;
+		uio->uio_offset = ds->offset + ds->off;
 	}
 
 	/* tell the calling layer whether we need to be called again */
 	*a->a_eofflag = uiodir.eofflag;
-	uio->uio_offset = ds->offset + ds->off;
 
 	if (error < 0)
 		error = 0;


More information about the svn-src-all mailing list