[BACK]Return to nfs_subs.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / nfs

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

Diff for /src/sys/nfs/nfs_subs.c between version 1.139 and 1.140

version 1.139, 2005/01/06 11:52:44 version 1.140, 2005/01/09 01:32:32
Line 1816  nfs_loadattrcache(vpp, fp, vaper, flags)
Line 1816  nfs_loadattrcache(vpp, fp, vaper, flags)
                 } else {                  } else {
                         np->n_size = vap->va_size;                          np->n_size = vap->va_size;
                         if (vap->va_type == VREG) {                          if (vap->va_type == VREG) {
                                 if ((flags & NAC_NOTRUNC)                                  /*
                                     && np->n_size < vp->v_size) {                                   * we can't free pages if NAC_NOTRUNC because
                                         /*                                   * the pages can be owned by ourselves.
                                          * we can't free pages now because                                   */
                                          * the pages can be owned by ourselves.                                  if (flags & NAC_NOTRUNC) {
                                          */  
                                         np->n_flag |= NTRUNCDELAYED;                                          np->n_flag |= NTRUNCDELAYED;
                                 }                                  } else {
                                 else {                                          simple_lock(&vp->v_interlock);
                                           (void)VOP_PUTPAGES(vp, 0,
                                               0, PGO_SYNCIO | PGO_CLEANIT |
                                               PGO_FREE | PGO_ALLPAGES);
                                         uvm_vnp_setsize(vp, np->n_size);                                          uvm_vnp_setsize(vp, np->n_size);
                                 }                                  }
                         }                          }
Line 1894  nfs_delayedtruncate(vp)
Line 1896  nfs_delayedtruncate(vp)
   
         if (np->n_flag & NTRUNCDELAYED) {          if (np->n_flag & NTRUNCDELAYED) {
                 np->n_flag &= ~NTRUNCDELAYED;                  np->n_flag &= ~NTRUNCDELAYED;
                   simple_lock(&vp->v_interlock);
                   (void)VOP_PUTPAGES(vp, 0,
                       0, PGO_SYNCIO | PGO_CLEANIT | PGO_FREE | PGO_ALLPAGES);
                 uvm_vnp_setsize(vp, np->n_size);                  uvm_vnp_setsize(vp, np->n_size);
         }          }
 }  }

Legend:
Removed from v.1.139  
changed lines
  Added in v.1.140

CVSweb <webmaster@jp.NetBSD.org>