Hi -

This part of the code is needlessly complicated. The first
for loop is not at all required. We could get rid of the first
for loop and directly call TryFlush..() in the second for loop.

Something like:


#endif /* AFS_FBSD_ENV */

+#if defined(AFS_LINUX22_ENV)
+          if (tvc != afs_globalVp && tvc->vrefCount && tvc->opens == 0)
+              afs_TryFlushDcacheChildren(tvc);
+#endif

 � � � � � if (VREFCOUNT(tvc) == 0 && tvc->opens == 0
 � � � � � � � && (tvc->states & CUnlinkedDel) == 0) {
 � � � � � � � �code = afs_FlushVCache(tvc, &fv_slept);
 � � � � � � � �if (code == 0) {
 � � � � � � � � �anumber--;
 � � � � � � � �}
 � � � � � � � �if (fv_slept) {
 � � � � � � � � �uq = VLRU.prev;
 � � � � � � � � �i = 0;
 � � � � � � � � �continue; �/* start over - may have raced. */
 � � � � � � � �}
 � � � � � }
 � � � � � if (tq == uq ) break;
 � � � �}

We also need to change TryFlushDcacheChildren to take a struct vcache *
and traverse all its dentries (and their children).

I sent the previous post to "[EMAIL PROTECTED]" by mistake.
Sorry about that.

Thanks,

Srikanth.


_______________________________________________
OpenAFS-devel mailing list
[EMAIL PROTECTED]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to