summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-04-28 12:52:56 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-04-30 02:54:41 -0700
commita152fa7ad96053093b88a010bff20e48aa5e5b70 (patch)
tree87a9568fd9bd6179f755b1a5419bd825e83ea9eb /xlators/features/quota
parent7648c0de36c7927b588abc66734c5b94afb08c00 (diff)
quota: Validate NULL inode from the entries received in readdirp_cbk
In quota readdirp_cbk, inode ctx filled for the all entries received. In marker readdirp_cbk, files/directories are inspected for dirty There is no guarantee that entry->inode is populated. If entry->inode is NULL, this needs to be treated as readdir Change-Id: Id2d17bb89e4770845ce1f13d73abc2b3c5826c06 BUG: 1215550 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10416 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 61a68e2464f..d8bacb7924f 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -4440,8 +4440,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;
gf_uuid_copy (loc.gfid, entry->d_stat.ia_gfid);