summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-03-15 16:56:20 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-03-15 16:56:20 +0000
commitfa6fb59ee494851cf2b57311084db755167ffa70 (patch)
tree78a5ce271e9efc54e40b9e42b607502c6548ae38 /libdiskfs
parent7f8251fb6ee5c780d0183db3ade7e0bd1c0d3909 (diff)
(diskfs_clear_directory): Implement diskfs_synchronous.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/dir-clear.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libdiskfs/dir-clear.c b/libdiskfs/dir-clear.c
index dc92923f..780877df 100644
--- a/libdiskfs/dir-clear.c
+++ b/libdiskfs/dir-clear.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994 Free Software Foundation
+ Copyright (C) 1994, 1995 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -35,6 +35,8 @@ diskfs_clear_directory (struct node *dp,
err = diskfs_dirremove (dp, ds);
else
diskfs_drop_dirstat (dp, ds);
+ if (diskfs_synchronous)
+ diskfs_file_update (dp, 1);
if (err)
return err;
@@ -49,6 +51,8 @@ diskfs_clear_directory (struct node *dp,
err = diskfs_dirremove (dp, ds);
else
diskfs_drop_dirstat (dp, ds);
+ if (diskfs_synchronous)
+ diskfs_file_update (dp, 1);
if (err)
return err;
@@ -56,7 +60,12 @@ diskfs_clear_directory (struct node *dp,
pdp->dn_stat.st_nlink--;
pdp->dn_set_ctime = 1;
+ if (diskfs_synchronous)
+ diskfs_node_update (pdp, 1);
+
diskfs_truncate (dp, 0);
+ if (diskfs_synchronous)
+ diskfs_file_update (dp, 1);
return err;
}