summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-07-05 21:19:01 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2014-07-08 04:52:13 -0700
commitb3bf2cfaa8e932f02a10a42e0281290a7cbdc960 (patch)
tree0052d49a8116225cd88377dce9df83092ebc34f6
parentecc21940eaa44a38618e8d1d9c9690fffbd5ac72 (diff)
performance/quick-read: Check for iobuf and iobref before unref.
In the absence of this check, iobuf_unref() can cause a log flood for read operations. Change-Id: Ib8beef6e55b69ecfb566bf61a96215ef0d0d74dc BUG: 1116514 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8242 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--xlators/performance/quick-read/src/quick-read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 55c5afc..bd3921d 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -584,9 +584,11 @@ unlock:
STACK_UNWIND_STRICT (readv, frame, op_ret, 0, &iov, 1,
&buf, iobref, xdata);
}
- iobuf_unref (iobuf);
+ if (iobuf)
+ iobuf_unref (iobuf);
- iobref_unref (iobref);
+ if (iobref)
+ iobref_unref (iobref);
return op_ret;
}