* vfs.c (vfs_add_noncurrent_stamps): Call vfs_rm_parents() at

the end.  Change all callers not to call it.
(vfs_rm_parents): Make static.
This commit is contained in:
Pavel Roskin 2003-10-11 17:30:54 +00:00
parent 3fb8e46501
commit 6e6fd9b352
6 changed files with 15 additions and 11 deletions

View File

@ -1,5 +1,9 @@
2003-10-11 Pavel Roskin <proski@gnu.org>
* vfs.c (vfs_add_noncurrent_stamps): Call vfs_rm_parents() at
the end. Change all callers not to call it.
(vfs_rm_parents): Make static.
* direntry.c: Don't use vfs_local_fs directly, use VFSF_LOCAL.
* extfs.c: Likewise.
* vfs.c (vfs_addstamp): Likewise.

View File

@ -471,7 +471,6 @@ vfs_s_stamp_me (vfs *me, struct vfs_s_super *psup, char *fs_name)
parent->id = (*v->getid) (v, fs_name, &(parent->parent));
}
vfs_add_noncurrent_stamps (me, (vfsid) psup, parent);
vfs_rm_parents (parent);
}
char *
@ -896,7 +895,6 @@ vfs_s_close (void *fh)
parent->id = (*v->getid) (v, FH_SUPER->name, &(parent->parent));
}
vfs_add_noncurrent_stamps (me, (vfsid) (FH_SUPER), parent);
vfs_rm_parents (parent);
}
if (FH->linear == LS_LINEAR_OPEN)
MEDATA->linear_close (me, fh);

View File

@ -462,7 +462,6 @@ get_path_mangle (char *inname, struct archive **archive, int is_dir,
parent->id = (*v->getid) (v, archive_name, &(parent->parent));
}
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) parc, parent);
vfs_rm_parents (parent);
}
return_success:
*archive = parc;
@ -763,7 +762,6 @@ extfs_close (void *data)
}
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) (file->archive),
parent);
vfs_rm_parents (parent);
}
g_free (data);

View File

@ -137,7 +137,6 @@ redirect (vfs *me, char *name)
head = cur;
vfs_add_noncurrent_stamps (&vfs_sfs_ops, (vfsid) head, NULL);
vfs_rm_parents (NULL);
return cache;
}

View File

@ -331,7 +331,7 @@ vfs_stamp (vfs *v, vfsid id)
}
}
void
static void
vfs_rm_parents (struct vfs_stamping *stamp)
{
struct vfs_stamping *parent;
@ -765,8 +765,8 @@ is_parent (vfs * nvfs, vfsid nvfsid, struct vfs_stamping *parent)
return (stamp ? 1 : 0);
}
void
vfs_add_noncurrent_stamps (vfs * oldvfs, vfsid oldvfsid, struct vfs_stamping *parent)
static void
_vfs_add_noncurrent_stamps (vfs *oldvfs, vfsid oldvfsid, struct vfs_stamping *parent)
{
vfs *nvfs, *n2vfs, *n3vfs;
vfsid nvfsid, n2vfsid, n3vfsid;
@ -845,6 +845,14 @@ vfs_add_noncurrent_stamps (vfs * oldvfs, vfsid oldvfsid, struct vfs_stamping *pa
}
}
void
vfs_add_noncurrent_stamps (vfs *oldvfs, vfsid oldvfsid,
struct vfs_stamping *parent)
{
_vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent);
vfs_rm_parents (parent);
}
static void
vfs_stamp_path (char *path)
{
@ -916,7 +924,6 @@ mc_chdir (char *path)
/* This function uses the new current_dir implicitly */
vfs_add_noncurrent_stamps (old_vfs, old_vfsid, parent);
vfs_rm_parents (parent);
/* Sometimes we assume no trailing slash on cwd */
if (*current_dir) {
@ -1868,5 +1875,4 @@ vfs_release_path (const char *dir)
oldvfs = vfs_get_class (dir);
oldvfsid = vfs_ncs_getid (oldvfs, dir, &parent);
vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent);
vfs_rm_parents (parent);
}

View File

@ -125,7 +125,6 @@ void vfs_shut (void);
struct vfs_class *vfs_get_class (const char *path);
vfs *vfs_split (const char *path, char **inpath, char **op);
void vfs_rm_parents (struct vfs_stamping *stamp);
char *vfs_path (const char *path);
char *vfs_strip_suffix_from_filename (const char *filename);
char *vfs_canon (const char *path);