mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
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.
This commit is contained in:
parent
2da6c2f223
commit
47212158a0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9679
@ -34,7 +34,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
|
* @(#)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);
|
return (error);
|
||||||
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
|
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
|
||||||
if (error) {
|
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);
|
vnode_pager_setsize(vp, (u_long)np->n_size);
|
||||||
}
|
}
|
||||||
return (error);
|
return (error);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)nfs_vnops.c 8.5 (Berkeley) 2/13/94
|
* @(#)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);
|
return (error);
|
||||||
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
|
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
|
||||||
if (error) {
|
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);
|
vnode_pager_setsize(vp, (u_long)np->n_size);
|
||||||
}
|
}
|
||||||
return (error);
|
return (error);
|
||||||
|
Loading…
Reference in New Issue
Block a user