diff options
| author | Amar Tumballi <amar@gluster.com> | 2009-03-31 15:49:57 -0700 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-01 13:21:12 +0530 | 
| commit | 39d67cbf8921db55e7205a94bce5c6d154a3a3d5 (patch) | |
| tree | 5c3d7dd663c46e4827c1aabb787d29fad54ba9a4 | |
| parent | db365c30d07f5faae4197e37148f64e75b54a7ec (diff) | |
fix a segfault with io-threads when iot-schedule is called with NULL inode
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 9ace53ba520..8c0674d6e23 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);  | 
