summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/dir-rmdir.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libdiskfs/dir-rmdir.c b/libdiskfs/dir-rmdir.c
index 5e3407d8..959864e4 100644
--- a/libdiskfs/dir-rmdir.c
+++ b/libdiskfs/dir-rmdir.c
@@ -68,19 +68,16 @@ diskfs_S_dir_rmdir (struct protid *dircred,
}
error = diskfs_dirremove (dnp, ds);
- if (diskfs_synchronous)
- diskfs_node_update (dnp, 1);
-
if (!error)
{
np->dn_stat.st_nlink--;
np->dn_set_ctime = 1;
+ diskfs_clear_directory (np, dnp, dircred);
if (diskfs_synchronous)
- diskfs_node_update (np, 1);
+ diskfs_file_update (np, 1);
}
-
- if (!error)
- diskfs_clear_directory (np, dnp, dircred);
+ if (diskfs_synchronous)
+ diskfs_file_update (dnp, 1);
diskfs_nput (np);
mutex_unlock (&dnp->lock);