summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix-handle.c')
-rw-r--r--xlators/storage/posix/src/posix-handle.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c
index 33bf3db56a5..a19b3ff00f5 100644
--- a/xlators/storage/posix/src/posix-handle.c
+++ b/xlators/storage/posix/src/posix-handle.c
@@ -284,7 +284,6 @@ posix_handle_init (xlator_t *this)
struct posix_private *priv = NULL;
char *handle_pfx = NULL;
int ret = 0;
- int len = 0;
struct stat stbuf;
struct stat rootbuf;
struct stat exportbuf;
@@ -337,9 +336,7 @@ posix_handle_init (xlator_t *this)
stat (handle_pfx, &priv->handledir);
- len = posix_handle_path (this, gfid, NULL, NULL, 0);
- rootstr = alloca (len);
- posix_handle_path (this, gfid, NULL, rootstr, len);
+ MAKE_HANDLE_ABSPATH(rootstr, this, gfid);
ret = stat (rootstr, &rootbuf);
switch (ret) {
@@ -529,7 +526,7 @@ posix_handle_hard (xlator_t *this, const char *oldpath, uuid_t gfid, struct stat
int ret = -1;
- MAKE_HANDLE_PATH (newpath, this, gfid, NULL);
+ MAKE_HANDLE_ABSPATH (newpath, this, gfid);
ret = lstat (newpath, &newbuf);
if (ret == -1 && errno != ENOENT) {
@@ -603,11 +600,9 @@ posix_handle_soft (xlator_t *this, const char *real_path, loc_t *loc,
struct stat newbuf;
int ret = -1;
-
- MAKE_HANDLE_PATH (newpath, this, gfid, NULL);
+ MAKE_HANDLE_ABSPATH (newpath, this, gfid);
MAKE_HANDLE_RELPATH (oldpath, this, loc->pargfid, loc->name);
-
ret = lstat (newpath, &newbuf);
if (ret == -1 && errno != ENOENT) {
gf_log (this->name, GF_LOG_WARNING,