diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 419ed15bab0e..403bd977e678 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 - * $Id: nfs_vnops.c,v 1.19 1995/07/13 08:47:55 davidg Exp $ + * $Id: nfs_vnops.c,v 1.20 1995/07/13 17:55:12 dfr Exp $ */ /* @@ -620,7 +620,8 @@ nfs_setattr(ap) return (error); error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p); if (error) { - np->n_size = np->n_vattr.va_size = tsize; + if (vap->va_size != VNOVAL) + np->n_size = np->n_vattr.va_size = tsize; vnode_pager_setsize(vp, (u_long)np->n_size); } return (error); diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 419ed15bab0e..403bd977e678 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94 - * $Id: nfs_vnops.c,v 1.19 1995/07/13 08:47:55 davidg Exp $ + * $Id: nfs_vnops.c,v 1.20 1995/07/13 17:55:12 dfr Exp $ */ /* @@ -620,7 +620,8 @@ nfs_setattr(ap) return (error); error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p); if (error) { - np->n_size = np->n_vattr.va_size = tsize; + if (vap->va_size != VNOVAL) + np->n_size = np->n_vattr.va_size = tsize; vnode_pager_setsize(vp, (u_long)np->n_size); } return (error);