summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-03-09 01:52:13 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-03-09 01:52:13 +0000
commitd08bddcdd2caedb1a7c8fc6102ec6fc606104c43 (patch)
tree3e339d729e742d422c0b060209ab402dd0f5fb2b
parent364b5b1e1c649837d98d3a2a19d7b3b014fb1396 (diff)
(diskfs_S_dir_rename): Implement diskfs_synchronous.
-rw-r--r--libdiskfs/dir-rename.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index 68fdf2f4..11841332 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs: dir_rename
- Copyright (C) 1992, 1993, 1994 Free Software Foundation
+ Copyright (C) 1992, 1993, 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
@@ -134,12 +134,17 @@ diskfs_S_dir_rename (struct protid *fromcred,
{
tnp->dn_stat.st_nlink--;
tnp->dn_set_ctime = 1;
+ if (diskfs_synchronous)
+ diskfs_node_update (tnp, 1);
}
diskfs_nput (tnp);
}
else
err = diskfs_direnter (tdp, toname, fnp, ds, tocred);
+ if (diskfs_synchronous)
+ diskfs_node_update (tdp, 1);
+
mutex_unlock (&tdp->lock);
mutex_unlock (&fnp->lock);
if (err)
@@ -177,9 +182,15 @@ diskfs_S_dir_rename (struct protid *fromcred,
diskfs_nrele (tmpnp);
err = diskfs_dirremove (fdp, ds);
+ if (diskfs_synchronous)
+ diskfs_node_update (fdp, 1);
fnp->dn_stat.st_nlink--;
fnp->dn_set_ctime = 1;
+
+ if (diskfs_synchronous)
+ diskfs_node_update (fnp, 1);
+
diskfs_nput (fnp);
mutex_unlock (&fdp->lock);
if (!err)