summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-inode-handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix-inode-handle.h')
-rw-r--r--xlators/storage/posix/src/posix-inode-handle.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/xlators/storage/posix/src/posix-inode-handle.h b/xlators/storage/posix/src/posix-inode-handle.h
index f225d94912b..36c47f2bebc 100644
--- a/xlators/storage/posix/src/posix-inode-handle.h
+++ b/xlators/storage/posix/src/posix-inode-handle.h
@@ -12,8 +12,7 @@
#include <limits.h>
#include <sys/types.h>
-#include "xlator.h"
-#include "gf-dirent.h"
+#include <glusterfs/gf-dirent.h>
#include "posix.h"
/* From Open Group Base Specifications Issue 6 */
@@ -45,14 +44,13 @@
#define MAKE_HANDLE_PATH(var, this, gfid, base) \
do { \
- int __len; \
- __len = posix_handle_path(this, gfid, base, NULL, 0); \
- if (__len <= 0) \
- break; \
- var = alloca(__len); \
- __len = posix_handle_path(this, gfid, base, var, __len); \
- if (__len <= 0) \
+ int __len = 0; \
+ int tot = PATH_MAX; \
+ var = alloca(tot); \
+ __len = posix_handle_path(this, gfid, base, var, tot); \
+ if (__len <= 0) { \
var = NULL; \
+ } \
} while (0)
/* TODO: it is not a good idea to change a variable which
@@ -91,8 +89,10 @@
(loc)->path); \
} \
break; \
+ } /* __ret == -1 && errno == ELOOP */ \
+ else { \
+ op_ret = -1; \
} \
- /* __ret == -1 && errno == ELOOP */ \
} while (0)
#define POSIX_ANCESTRY_PATH (1 << 0)