summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-12-24 14:29:33 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-02-08 21:24:57 -0800
commitdd8306b2f2e38f5de1386461d7f33ac0b64f2886 (patch)
treec6b303e76383d695d886fa995e05476a36fdc125
parent6608b5cc1f9d01261b767c3abae212c6222e6ba6 (diff)
performance/open-behind: Fix fdctx dump NULL dereference
Also printing flags correctly in statedump now Change-Id: Ibfdd74aab5643ecc47d0a88f109d5d1050685f5a BUG: 1294051 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13076 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/performance/open-behind/src/open-behind.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
index 97c12fab411..efab88582ff 100644
--- a/xlators/performance/open-behind/src/open-behind.c
+++ b/xlators/performance/open-behind/src/open-behind.c
@@ -865,14 +865,15 @@ ob_fdctx_dump (xlator_t *this, fd_t *fd)
gf_proc_dump_write ("open_frame", "%p", ob_fd->open_frame);
- gf_proc_dump_write ("open_frame.root.unique", "%p",
- ob_fd->open_frame->root->unique);
+ if (ob_fd->open_frame)
+ gf_proc_dump_write ("open_frame.root.unique", "%p",
+ ob_fd->open_frame->root->unique);
gf_proc_dump_write ("loc.path", "%s", ob_fd->loc.path);
gf_proc_dump_write ("loc.ino", "%s", uuid_utoa (ob_fd->loc.gfid));
- gf_proc_dump_write ("flags", "%p", ob_fd->open_frame);
+ gf_proc_dump_write ("flags", "%d", ob_fd->flags);
UNLOCK (&fd->lock);