From 39d67cbf8921db55e7205a94bce5c6d154a3a3d5 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 31 Mar 2009 15:49:57 -0700 Subject: fix a segfault with io-threads when iot-schedule is called with NULL inode Signed-off-by: Anand V. Avati --- xlators/performance/io-threads/src/io-threads.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 9ace53ba5..8c0674d6e 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -44,7 +44,8 @@ iot_schedule (iot_conf_t *conf, int32_t idx = 0; iot_worker_t *selected_worker = NULL; - idx = (inode->ino % conf->thread_count); + if (inode) + idx = (inode->ino % conf->thread_count); selected_worker = conf->workers[idx]; iot_queue (selected_worker, stub); -- cgit