From 20d74c540879d3994d56b9baf7044c79ae5df5e3 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 29 Jan 2012 16:17:21 +0530 Subject: storage/posix: Fix rename gfid handle unset Change-Id: I365ef264056691914ad5bd620d8150f8b71ec887 BUG: 785524 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2698 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 5cfdbd4f5..b5957e4e9 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1281,9 +1281,9 @@ posix_rename (call_frame_t *frame, xlator_t *this, struct iatt postnewparent = {0, }; char olddirid[64]; char newdirid[64]; - uuid_t victim; - int was_dir; - int nlink; + uuid_t victim = {0}; + int was_dir = 0; + int nlink = 0; DECLARE_OLD_FS_ID_VAR; @@ -1365,7 +1365,7 @@ posix_rename (call_frame_t *frame, xlator_t *this, if (was_dir) posix_handle_unset (this, victim, NULL); - if (was_present && !was_dir && nlink == 2) + if (was_present && !was_dir && nlink == 1) posix_handle_unset (this, victim, NULL); if (IA_ISDIR (oldloc->inode->ia_type)) { -- cgit