libafs: Do not osi_FlushPages for dirs
[openafs.git] / src / afs / afs_osi_vm.c
index c26df6d..66071ac 100644 (file)
@@ -58,6 +58,11 @@ osi_FlushPages(struct vcache *avc, afs_ucred_t *credp)
      * citi-tr-01-3.
      */
 #endif
+    if (vType(avc) == VDIR) {
+       /* not applicable to directories; they're never mapped or stored in
+        * pages */
+       return;
+    }
     ObtainReadLock(&avc->lock);
     /* If we've already purged this version, or if we're the ones
      * writing this version, don't flush it (could lose the