From 6e6fd9b3522476ee8f08e5d8b528fcd04ff51306 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 11 Oct 2003 17:30:54 +0000 Subject: [PATCH] * 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. --- vfs/ChangeLog | 4 ++++ vfs/direntry.c | 2 -- vfs/extfs.c | 2 -- vfs/sfs.c | 1 - vfs/vfs.c | 16 +++++++++++----- vfs/vfs.h | 1 - 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 1a4bd1324..54269c045 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,9 @@ 2003-10-11 Pavel Roskin + * 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. diff --git a/vfs/direntry.c b/vfs/direntry.c index 5e77a1d10..f870d1fe9 100644 --- a/vfs/direntry.c +++ b/vfs/direntry.c @@ -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); diff --git a/vfs/extfs.c b/vfs/extfs.c index 645fc0cee..7c4363221 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -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); diff --git a/vfs/sfs.c b/vfs/sfs.c index d20ef551c..f4b6c1b8c 100644 --- a/vfs/sfs.c +++ b/vfs/sfs.c @@ -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; } diff --git a/vfs/vfs.c b/vfs/vfs.c index b1b63d811..2be4e1543 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -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); } diff --git a/vfs/vfs.h b/vfs/vfs.h index 698a2d23f..67bd55281 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -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);