diff options
Diffstat (limited to 'xlators/storage/posix/src/posix-handle.c')
-rw-r--r-- | xlators/storage/posix/src/posix-handle.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c index 99501177138..a3a8ea464d3 100644 --- a/xlators/storage/posix/src/posix-handle.c +++ b/xlators/storage/posix/src/posix-handle.c @@ -204,6 +204,18 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize, while (top >= 0) { + if (!*parent) { + /* There's no real "root" cause for how we end up here, + * so for now let's log this and bail out to prevent + * crashes. + */ + gf_msg (this->name, GF_LOG_WARNING, + P_MSG_INODE_RESOLVE_FAILED, 0, + "OOPS: *parent is null (path: %s), bailing!", + path); + goto out; + } + memset (&iabuf, 0, sizeof (iabuf)); inode = posix_resolve (this, itable, *parent, dir_stack[top], &iabuf); |