Sometimes the osd_oi_fini() may be called without osd_oi_init()
called firstly, or with osd_oi_init() failure. Under such cases,
the osd_device::od_oi_table may be invalid, so just skip related
OI cleanup.
Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Iffa008b29bb8763fcdc4d12c1e4cae93026a25b3
Reviewed-on: http://review.whamcloud.com/4219
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
void osd_oi_fini(struct osd_thread_info *info, struct osd_device *osd)
{
+ if (unlikely(osd->od_oi_table == NULL))
+ return;
+
osd_oi_table_put(info, osd->od_oi_table, osd->od_oi_count);
OBD_FREE(osd->od_oi_table,