summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/ChangeLog6
-rw-r--r--libdiskfs/dir-rename.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog
index 4f26458b..38fd608a 100644
--- a/libdiskfs/ChangeLog
+++ b/libdiskfs/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-15 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * dir-rename.c (diskfs_S_dir_rename): Call diskfs_nput (tnp) in
+ the EISDIR and EMLINK cases too. Reported by Olaf Buddenhagen
+ <olafbuddenhagen@gmx.net>.
+
2007-11-13 Thomas Schwinge <tschwinge@gnu.org>
* node-times.c (diskfs_set_node_times): Adapt to ``struct stat''
diff --git a/libdiskfs/dir-rename.c b/libdiskfs/dir-rename.c
index 6fc7e0f5..0bda7b91 100644
--- a/libdiskfs/dir-rename.c
+++ b/libdiskfs/dir-rename.c
@@ -138,6 +138,7 @@ diskfs_S_dir_rename (struct protid *fromcred,
{
diskfs_drop_dirstat (tdp, ds);
diskfs_nrele (fnp);
+ diskfs_nput (tnp);
mutex_unlock (&tdp->lock);
return EISDIR;
}
@@ -149,6 +150,8 @@ diskfs_S_dir_rename (struct protid *fromcred,
{
diskfs_drop_dirstat (tdp, ds);
diskfs_nput (fnp);
+ if (tnp)
+ diskfs_nput (tnp);
mutex_unlock (&tdp->lock);
return EMLINK;
}