Author: avg
Date: Mon May 16 07:31:11 2016
New Revision: 299916
URL: https://svnweb.freebsd.org/changeset/base/299916

Log:
  vfs_read_dirent: increment ncookies after adding a cookie
  
  It seems that at present vfs_read_dirent() is used only with filesystems
  that do not support cookies, so the bug never manifested itself.
  
  MFC after:    1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c    Mon May 16 07:29:50 2016        (r299915)
+++ head/sys/kern/vfs_subr.c    Mon May 16 07:31:11 2016        (r299916)
@@ -5053,6 +5053,7 @@ vfs_read_dirent(struct vop_readdir_args 
        *ap->a_cookies = realloc(*ap->a_cookies,
            (*ap->a_ncookies + 1) * sizeof(u_long), M_TEMP, M_WAITOK | M_ZERO);
        (*ap->a_cookies)[*ap->a_ncookies] = off;
+       *ap->a_ncookies += 1;
        return (0);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to