diff options
author | dfr <dfr@FreeBSD.org> | 1995-07-24 12:50:49 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1995-07-24 12:50:49 +0000 |
commit | 8395ec3635821f95746a66506b842afdca652b15 (patch) | |
tree | f1f1430b61e8e40799f5897ab248aeaa2a95cf0c /sys/nfsclient | |
parent | 6901602ad3dae28a4fc614a73a06326ca850eba0 (diff) | |
download | FreeBSD-src-8395ec3635821f95746a66506b842afdca652b15.zip FreeBSD-src-8395ec3635821f95746a66506b842afdca652b15.tar.gz |
Fix a problem which appeared to truncate a file to the nearest block boundary
when it is moved to an NFS filesystem from from another filesystem and /bin/mv
failed to set the file ownership during the move.
I believe that this bug is present in STABLE but I have not tested it. The fix
would be the same in STABLE even though the code has changed quite considerably
in CURRENT.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 419ed15..403bd97 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); |