diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-01-29 16:17:21 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2012-01-29 23:31:17 -0800 |
commit | 20d74c540879d3994d56b9baf7044c79ae5df5e3 (patch) | |
tree | 8172e8665f50f1cbc214031e280c0cd25d9fc503 /xlators/storage/posix | |
parent | 21bad6eb3a3c48ad3edc37927aeabcd3de8b9d64 (diff) |
storage/posix: Fix rename gfid handle unset
Change-Id: I365ef264056691914ad5bd620d8150f8b71ec887
BUG: 785524
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2698
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 5cfdbd4f5ee..b5957e4e9c6 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)) { |