summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/marker/src/marker.c14
-rw-r--r--xlators/features/quota/src/quota.c5
2 files changed, 13 insertions, 6 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 40777d57ab2..ead4779df91 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -2749,8 +2749,13 @@ marker_build_ancestry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
parent = NULL;
}
- ret = marker_inode_loc_fill (entry->inode,
- entry->d_name, &loc);
+ if (parent) {
+ ret = marker_inode_loc_fill (parent,
+ entry->d_name, &loc);
+ } else {
+ ret = marker_inode_loc_fill (entry->inode, NULL, &loc);
+ }
+
if (ret) {
gf_log (this->name, GF_LOG_WARNING, "Couldn't build "
"loc for %s/%s",
@@ -2797,8 +2802,9 @@ marker_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
list_for_each_entry (entry, &entries->list, list) {
- if ((strcmp (entry->d_name, ".") == 0) ||
- (strcmp (entry->d_name, "..") == 0))
+ if ((strcmp (entry->d_name, ".") == 0) ||
+ (strcmp (entry->d_name, "..") == 0) ||
+ entry->inode == NULL)
continue;
loc.parent = inode_ref (local->loc.inode);
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 7d60dfab4c5..9dcfb74b3fa 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -3895,8 +3895,9 @@ quota_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
list_for_each_entry (entry, &entries->list, list) {
- if ((strcmp (entry->d_name, ".") == 0)
- || (strcmp (entry->d_name, "..") == 0))
+ if ((strcmp (entry->d_name, ".") == 0) ||
+ (strcmp (entry->d_name, "..") == 0) ||
+ entry->inode == NULL)
continue;
uuid_copy (loc.gfid, entry->d_stat.ia_gfid);