diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2013-08-13 22:42:10 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2013-09-03 10:28:03 +0530 |
commit | 913178c58c9a7536d39306672f597183f7fde8d3 (patch) | |
tree | cf3fbe9476992349a0ff253b2c7f61679a1322e8 | |
parent | 2d1530e6987f961b76d8ed531beeafca50e6ccb1 (diff) |
features/marker: dont process "." and ".." in readdirp_cbk
Change-Id: Iccc4aefebda7d1cd029642adf08806befadd14ad
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r-- | xlators/features/marker/src/marker.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 2a0c509c..bed8a5c3 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -2487,10 +2487,14 @@ 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)) + continue; + loc.inode = inode_ref (entry->inode); loc.parent = inode_ref (local->loc.inode); - uuid_copy (loc.gfid, loc.inode->gfid); + uuid_copy (loc.gfid, entry->d_stat.ia_gfid); uuid_copy (loc.pargfid, loc.parent->gfid); mq_xattr_state (this, &loc, entry->dict, entry->d_stat); |