From b9fef00edbe7272d31be0ca22f3b2794918300e0 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 17 Mar 2009 21:59:30 -0700 Subject: Add return after STACK_UNWIND We must add a 'return' after a STACK_UNWIND due to a stub creation failure, because if we dont, we'll end up adding a NULL stub to the worker thread request queue. Signed-off-by: Anand V. Avati --- xlators/performance/io-threads/src/io-threads.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/performance/io-threads') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 3bebb3185..9ace53ba5 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -88,6 +88,7 @@ iot_open (call_frame_t *frame, gf_log (this->name, GF_LOG_ERROR, "cannot get open call stub"); STACK_UNWIND (frame, -1, ENOMEM, NULL, 0); + return 0; } iot_schedule ((iot_conf_t *)this->private, loc->inode, stub); @@ -144,6 +145,7 @@ iot_create (call_frame_t *frame, gf_log (this->name, GF_LOG_ERROR, "cannot get create call stub"); STACK_UNWIND (frame, -1, ENOMEM, NULL, 0); + return 0; } iot_schedule ((iot_conf_t *)this->private, loc->inode, stub); return 0; -- cgit