cvs commit: src/sys/nfs nfs_vnops.c

Tim J. Robbins tjr at FreeBSD.org
Sat Jan 10 00:24:35 PST 2004


tjr         2004/01/10 00:24:33 PST

  FreeBSD src repository

  Modified files:        (Branch: RELENG_4)
    sys/nfs              nfs_vnops.c 
  Log:
  MFC: Fix a problem that occurs when truncating files on NFSv3 mounts: we
  need to set np->n_size back to the desired size again after calling
  nfs_meta_setsize(), since it could end up in nfs_loadattrcache() getting
  called, which would change n_size back to the value it had before the
  truncate request was issued. The result of this bug is that the size info
  cached in the nfsnode becomes incorrect, lseek(fd, ofs, SEEK_END) seeks
  past the end of the file, stat() returns the wrong size, etc.
  
  PR:             41792
  
  Revision   Changes    Path
  1.150.2.8  +7 -1      src/sys/nfs/nfs_vnops.c


More information about the cvs-src mailing list