summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-02-14 00:30:06 +0000
committerrwatson <rwatson@FreeBSD.org>2008-02-14 00:30:06 +0000
commit0cf10cfc004db23371ad6b56068c2063b664e5d0 (patch)
tree72f30b5d0d2a585b3211e2a4978f3562168b79e9 /sys/fs
parent960266ca30f2cc722fa489cd00452c17a252f4e3 (diff)
downloadFreeBSD-src-0cf10cfc004db23371ad6b56068c2063b664e5d0.zip
FreeBSD-src-0cf10cfc004db23371ad6b56068c2063b664e5d0.tar.gz
In Coda, flush the attribute cache for a cnode when its fid is
changed, as its synthesized inode number may have changed and we want stat(2) to pick up the new inode number. MFC after: 1 month
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/coda/coda_subr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c
index f28e052..e522bfe 100644
--- a/sys/fs/coda/coda_subr.c
+++ b/sys/fs/coda/coda_subr.c
@@ -561,11 +561,14 @@ handleDownCall(struct coda_mntinfo *mnt, int opcode, union outputArgs *out)
if (cp != NULL) {
/*
* Remove the cnode from the hash table, replace the
- * fid, and reinsert.
+ * fid, and reinsert. Clear the attribute cache as
+ * the "inode number" may have changed (it's just a
+ * hash of the fid, and the fid is changing).
*/
vref(CTOV(cp));
coda_unsave(cp);
cp->c_fid = out->coda_replace.NewFid;
+ cp->c_flags &= ~C_VATTR;
coda_save(cp);
CODADEBUG(CODA_REPLACE, myprintf(("replace: oldfid "
"= %s, newfid = %s, cp = %p\n",
OpenPOWER on IntegriCloud