diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2014-01-13 12:10:40 -0500 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2014-01-23 11:36:22 -0500 |
commit | 2deb76db092a91088494c00862bafc4fe7980adb (patch) | |
tree | cef48ceee9a2dd07d4939f442d9d4e3a16c3fa33 /fs/exofs | |
parent | aad560b7f63b495f48a7232fd086c5913a676e6f (diff) |
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: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/ore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index 85cde3e76290..dae884694bd9 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c | |||
@@ -431,8 +431,12 @@ int ore_check_io(struct ore_io_state *ios, ore_on_dev_error on_dev_error) | |||
431 | if (likely(!ret)) | 431 | if (likely(!ret)) |
432 | continue; | 432 | continue; |
433 | 433 | ||
434 | if (OSD_ERR_PRI_CLEAR_PAGES == osi.osd_err_pri) { | 434 | if ((OSD_ERR_PRI_CLEAR_PAGES == osi.osd_err_pri) && |
435 | /* start read offset passed endof file */ | 435 | per_dev->bio) { |
436 | /* start read offset passed endof file. | ||
437 | * Note: if we do not have bio it means read-attributes | ||
438 | * In this case we should return error to caller. | ||
439 | */ | ||
436 | _clear_bio(per_dev->bio); | 440 | _clear_bio(per_dev->bio); |
437 | ORE_DBGMSG("start read offset passed end of file " | 441 | ORE_DBGMSG("start read offset passed end of file " |
438 | "offset=0x%llx, length=0x%llx\n", | 442 | "offset=0x%llx, length=0x%llx\n", |