From fe06790a3637c30dc8d5e0be7367f27ee24c36bd Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Mon, 11 May 2009 18:24:21 +0530 Subject: libglusterfsclient: Wipe loc->ino in libgf_client_loc_wipe Not cleaning up the ino member of a loc_t results in SIGABRT in __inode_link because in some cases, the loc->ino is different from loc->inode->ino. This happens especially in code blocks which re-use a loc_t structure for pointing at different inodes/files. For eg, if a loc_t has been assigned an inode and an ino, and followed by a libgf_client_loc_wipe, then re-use of this loc in say libgf_client_lookup results the SIGABRT because libgf_client_lookup calls inode_link with the same loc_t. However, this loc_t has just been assigned a new inode pointer but the ino member still contains a previous inode's inode number. This difference in inode numbers results in an assertion failure, so the SIGABRT. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libglusterfsclient/src/libglusterfsclient.c') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 095edaa7cf7..91f1057765c 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -532,6 +532,7 @@ libgf_client_loc_wipe (loc_t *loc) } loc->path = loc->name = NULL; + loc->ino = 0; } -- cgit