From e4632a52dda7d13205b008567c4fee879dc80055 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 16 Nov 2007 04:53:36 +0000 Subject: 2007-11-15 Samuel Thibault * dir-rename.c (diskfs_S_dir_rename): Call diskfs_nput (tnp) in the EISDIR and EMLINK cases too. Reported by Olaf Buddenhagen . --- libdiskfs/ChangeLog | 6 ++++++ libdiskfs/dir-rename.c | 3 +++ 2 files changed, 9 insertions(+) (limited to 'libdiskfs') 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 + + * dir-rename.c (diskfs_S_dir_rename): Call diskfs_nput (tnp) in + the EISDIR and EMLINK cases too. Reported by Olaf Buddenhagen + . + 2007-11-13 Thomas Schwinge * 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; } -- cgit v1.2.3