Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r17 - in trunk: . fsvs/src

fsvs
Discussion topic

Back to topic list

svn commit: r17 - in trunk: . fsvs/src

Author pmarek
Full name P.Marek
Date 2005-10-04 23:03:05 PDT
Message Author: pmarek
Date: Tue Oct 4 23:03:05 2005
New Revision: 17

Modified:
   trunk/ (props changed)
   trunk/fsvs/src/waa.c
Log:
bugfix: entries below removed directories gave a SEGV, as the by_inode array was not allocated



Modified: trunk/fsvs/src/waa.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/waa​.c?view=diff&rev​=17&p1=trunk/fsv​s/src/waa.c&r1=1​6&p2=trunk/fsvs/​src/waa.c&r2=17
====================​====================​====================​==================
--- trunk/fsvs/src/waa.c (original)
+++ trunk/fsvs/src/waa.c Tue Oct 4 23:03:05 2005
@@ -1031,6 +1031,15 @@
                 sts->parent=stat_mem+i;
             }
 
+ /* If a directory has been deleted, all of it's children don't
+ * exist anymore, too.
+ * We avoid allocating memory, just tell that they're missing.
+ * The goto is a bit ugly here; but it's the same thing to be done,
+ * and it's not better to reach it via several if's or somesuch.
+ * We have to do that for REMOVED and REPLACED. */
+ if (sts->parent->​entry_status & FS_REMOVED)
+ goto removed;
+
             sts->parent->by_inode[ sts->parent->s​ubdir_count++ ] = sts;
             BUG_ON(sts->paren​t->subdir_count > sts->parent->entry_count,
                 "too many children for parent");
@@ -1059,6 +1068,7 @@
         {
             DEBUGP("lstat whines %d",errno);
             /* entry removed ??? */
+removed:
             sts->entry_status​=FS_REMOVED;
             STOPIF( ac__dispatch(sts, fullpath), NULL);
         }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r17 - in trunk: . fsvs/src pmarek P.Marek 2005-10-04 23:03:05 PDT
Messages per page: