diff options
author | jhb <jhb@FreeBSD.org> | 2009-02-19 22:10:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-02-19 22:10:39 +0000 |
commit | 76ad79ad2cd4b1796f0d3442bf0167bfdaa21f1d (patch) | |
tree | 9e40b8fed86508eef3e7988026e122e704ba4ce6 /sys/nfsclient/nfs_vnops.c | |
parent | 190e541ba084c770df94864ecba33d5ed3d94a2d (diff) | |
download | FreeBSD-src-76ad79ad2cd4b1796f0d3442bf0167bfdaa21f1d.zip FreeBSD-src-76ad79ad2cd4b1796f0d3442bf0167bfdaa21f1d.tar.gz |
Don't clear the attribute cache of a file when it is closed. A subsequent
open() of the same file will load fresh attributes, so they do not need to
be explicitly flushed in close() to guarantee close to open consistency.
However, other file desciptors may still reference this file and clearing
the attributes in close() forces those other file descriptors to fetch
fresh attributes the next time they need them.
Reviewed by: mohans
MFC after: 1 week
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 17c156d..54f8be5 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -594,13 +594,6 @@ nfs_close(struct vop_close_args *ap) error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); mtx_lock(&np->n_mtx); } - /* - * Invalidate the attribute cache in all cases. - * An open is going to fetch fresh attrs any way, other procs - * on this node that have file open will be forced to do an - * otw attr fetch, but this is safe. - */ - np->n_attrstamp = 0; if (np->n_flag & NWRITEERR) { np->n_flag &= ~NWRITEERR; error = np->n_error; |