From 43f9c85e2ee7b10fe3c118d872f6adf54600ccb7 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 9 Jun 1995 19:48:27 +0000 Subject: (diskfs_S_dir_rename): After renaming directory, synchronize relevant state if DISKFS_SYNCHRONOUS. --- libdiskfs/dir-rename.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c index 11841332..a8a7760f 100644 --- a/libdiskfs/dir-rename.c +++ b/libdiskfs/dir-rename.c @@ -68,6 +68,21 @@ diskfs_S_dir_rename (struct protid *fromcred, } err = diskfs_rename_dir (fdp, fnp, fromname, tdp, toname, fromcred, tocred); + if (diskfs_synchronous) + { + mutex_lock (&fdp->lock); + diskfs_file_update (fdp, 1); + mutex_unlock (&fdp->lock); + + mutex_lock (&fnp->lock); + diskfs_file_update (fnp, 1); + mutex_unlock (&fnp->lock); + + mutex_lock (&tdp->lock); + diskfs_file_update (tdp, 1); + mutex_unlock (&tdp->lock); + } + diskfs_nrele (fnp); mutex_unlock (&renamedirlock); if (!err) -- cgit v1.2.3