[BACK]Return to fdesc_vnops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / miscfs / fdesc

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/miscfs/fdesc/fdesc_vnops.c between version 1.129.10.1 and 1.129.10.2

version 1.129.10.1, 2019/06/10 22:09:05 version 1.129.10.2, 2020/04/08 14:08:53
Line 47  __KERNEL_RCSID(0, "$NetBSD$");
Line 47  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/systm.h>  #include <sys/systm.h>
 #include <sys/time.h>  #include <sys/time.h>
 #include <sys/proc.h>  #include <sys/proc.h>
 #include <sys/kernel.h> /* boottime */  
 #include <sys/resourcevar.h>  #include <sys/resourcevar.h>
 #include <sys/socketvar.h>  #include <sys/socketvar.h>
 #include <sys/filedesc.h>  #include <sys/filedesc.h>
Line 207  fdesc_lookup(void *v)
Line 206  fdesc_lookup(void *v)
         int error, ix = -1;          int error, ix = -1;
         fdtab_t *dt;          fdtab_t *dt;
   
         dt = curlwp->l_fd->fd_dt;          dt = atomic_load_consume(&curlwp->l_fd->fd_dt);
   
         if (cnp->cn_namelen == 1 && *pname == '.') {          if (cnp->cn_namelen == 1 && *pname == '.') {
                 *vpp = dvp;                  *vpp = dvp;
Line 412  fdesc_getattr(void *v)
Line 411  fdesc_getattr(void *v)
         struct vattr *vap = ap->a_vap;          struct vattr *vap = ap->a_vap;
         unsigned fd;          unsigned fd;
         int error = 0;          int error = 0;
           struct timeval tv;
   
         switch (VTOFDESC(vp)->fd_type) {          switch (VTOFDESC(vp)->fd_type) {
         case Froot:          case Froot:
Line 454  fdesc_getattr(void *v)
Line 454  fdesc_getattr(void *v)
                 vap->va_gid = 0;                  vap->va_gid = 0;
                 vap->va_fsid = vp->v_mount->mnt_stat.f_fsidx.__fsid_val[0];                  vap->va_fsid = vp->v_mount->mnt_stat.f_fsidx.__fsid_val[0];
                 vap->va_blocksize = DEV_BSIZE;                  vap->va_blocksize = DEV_BSIZE;
                 vap->va_atime.tv_sec = boottime.tv_sec;                  getmicroboottime(&tv);
                   vap->va_atime.tv_sec = tv.tv_sec;
                 vap->va_atime.tv_nsec = 0;                  vap->va_atime.tv_nsec = 0;
                 vap->va_mtime = vap->va_atime;                  vap->va_mtime = vap->va_atime;
                 vap->va_ctime = vap->va_mtime;                  vap->va_ctime = vap->va_mtime;
Line 566  fdesc_readdir(void *v)
Line 567  fdesc_readdir(void *v)
                 break;                  break;
         }          }
   
         dt = curlwp->l_fd->fd_dt;          dt = atomic_load_consume(&curlwp->l_fd->fd_dt);
   
         if (uio->uio_resid < UIO_MX)          if (uio->uio_resid < UIO_MX)
                 return EINVAL;                  return EINVAL;
Line 628  fdesc_readdir(void *v)
Line 629  fdesc_readdir(void *v)
                                 *cookies++ = i + 1;                                  *cookies++ = i + 1;
                 }                  }
         } else {          } else {
                 membar_consumer();  
                 if (ap->a_ncookies) {                  if (ap->a_ncookies) {
                         ncookies = uimin(ncookies, dt->dt_nfiles + 2);                          ncookies = uimin(ncookies, dt->dt_nfiles + 2);
                         cookies = malloc(ncookies * sizeof(off_t),                          cookies = malloc(ncookies * sizeof(off_t),

Legend:
Removed from v.1.129.10.1  
changed lines
  Added in v.1.129.10.2

CVSweb <webmaster@jp.NetBSD.org>