Commit 2deb76db authored by Boaz Harrosh's avatar Boaz Harrosh

ore: Don't crash on NULL bio in _clear_bio

In the case of target returning OSD_ERR_PRI_CLEAR_PAGES when we
only sent for attributes don't crash on NULL bio.
This is an osd-target bug but don't crash regardless
Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
parent aad560b7
...@@ -431,8 +431,12 @@ int ore_check_io(struct ore_io_state *ios, ore_on_dev_error on_dev_error) ...@@ -431,8 +431,12 @@ int ore_check_io(struct ore_io_state *ios, ore_on_dev_error on_dev_error)
if (likely(!ret)) if (likely(!ret))
continue; continue;
if (OSD_ERR_PRI_CLEAR_PAGES == osi.osd_err_pri) { if ((OSD_ERR_PRI_CLEAR_PAGES == osi.osd_err_pri) &&
/* start read offset passed endof file */ per_dev->bio) {
/* start read offset passed endof file.
* Note: if we do not have bio it means read-attributes
* In this case we should return error to caller.
*/
_clear_bio(per_dev->bio); _clear_bio(per_dev->bio);
ORE_DBGMSG("start read offset passed end of file " ORE_DBGMSG("start read offset passed end of file "
"offset=0x%llx, length=0x%llx\n", "offset=0x%llx, length=0x%llx\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment