diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-06-09 19:48:27 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-06-09 19:48:27 +0000 |
commit | 43f9c85e2ee7b10fe3c118d872f6adf54600ccb7 (patch) | |
tree | 6e7d3c0722d483a3ba05ef8fc156ec0ec1cb6e8d /libdiskfs/dir-rename.c | |
parent | 325358e45449931effeb9aea8f072a6fd1ea0e0c (diff) |
(diskfs_S_dir_rename): After renaming directory, synchronize relevant
state if DISKFS_SYNCHRONOUS.
Diffstat (limited to 'libdiskfs/dir-rename.c')
-rw-r--r-- | libdiskfs/dir-rename.c | 15 |
1 files changed, 15 insertions, 0 deletions
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) |