From owner-cvs-all@FreeBSD.ORG Mon Jul 28 17:17:30 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2D6137B401; Mon, 28 Jul 2003 17:17:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D1A943F75; Mon, 28 Jul 2003 17:17:30 -0700 (PDT) (envelope-from tjr@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6T0HU0U054074; Mon, 28 Jul 2003 17:17:30 -0700 (PDT) (envelope-from tjr@repoman.freebsd.org) Received: (from tjr@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6T0HThe054073; Mon, 28 Jul 2003 17:17:29 -0700 (PDT) Message-Id: <200307290017.h6T0HThe054073@repoman.freebsd.org> From: "Tim J. Robbins" Date: Mon, 28 Jul 2003 17:17:29 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/nfsclient nfs_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2003 00:17:31 -0000 tjr 2003/07/28 17:17:29 PDT FreeBSD src repository Modified files: sys/nfsclient nfs_vnops.c Log: 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 MFC after: 2 weeks Revision Changes Path 1.208 +7 -1 src/sys/nfsclient/nfs_vnops.c