libafs: dont handle outstatus on write error
[openafs.git] / src / afs / afs_fetchstore.c
index 16c0550..9fb766f 100644 (file)
@@ -543,6 +543,7 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist,
 
     if (!code) {
        code = (*ops->close)(rock, OutStatus, doProcessFS);
+       /* if this succeeds, dv has been bumped. */
        if (*doProcessFS) {
            hadd32(*anewDV, 1);
        }
@@ -550,6 +551,11 @@ afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist,
     }
     if (ops)
        code = (*ops->destroy)(&rock, code);
+
+    /* if we errored, can't trust this. */
+    if (code)
+       *doProcessFS = 0;
+
     return code;
 }