aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2003-07-29 00:17:29 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2003-07-29 00:17:29 +0000
commitaae962d56ef0734dea72b7a57d3a1c0bbf62bf18 (patch)
tree4f9da5e34efed285c8df8fbf5b49b547d23442c5
parentc9ae54eebb82cd0fd7317ea897e029aada7c9501 (diff)
Notes
-rw-r--r--sys/nfsclient/nfs_vnops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 2e4fe050f735..158e76f3aede 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -662,7 +662,13 @@ nfs_setattr(struct vop_setattr_args *ap)
return (error);
}
}
- np->n_vattr.va_size = vap->va_size;
+ /*
+ * np->n_size has already been set to vap->va_size
+ * in nfs_meta_setsize(). We must set it again since
+ * nfs_loadattrcache() could be called through
+ * nfs_meta_setsize() and could modify np->n_size.
+ */
+ np->n_vattr.va_size = np->n_size = vap->va_size;
};
} else if ((vap->va_mtime.tv_sec != VNOVAL ||
vap->va_atime.tv_sec != VNOVAL) && (np->n_flag & NMODIFIED) &&