diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2011-12-27 19:23:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-12 11:29:27 -0800 |
commit | 688485273b3173d2fdb590ff916b55c581da6ed0 (patch) | |
tree | 5b8538da4e38fd8bce7a23ba72ee5688a9e35bb7 /fs | |
parent | 923415295307845e614589c1cce62abedd4d1731 (diff) |
ore: Fix crash in case of an IO error.
commit ffefb8eaa367e8a5c14f779233d9da1fbc23d164 upstream.
The users of ore_check_io() expect the reported device
(In case of error) to be indexed relative to the passed-in
ore_components table, and not the logical dev index.
This causes a crash inside objlayoutdriver in case of
an IO error.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/exofs/ore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c index d271ad83720..894f3e192e6 100644 --- a/fs/exofs/ore.c +++ b/fs/exofs/ore.c @@ -445,10 +445,10 @@ int ore_check_io(struct ore_io_state *ios, ore_on_dev_error on_dev_error) u64 residual = ios->reading ? or->in.residual : or->out.residual; u64 offset = (ios->offset + ios->length) - residual; - struct ore_dev *od = ios->oc->ods[ - per_dev->dev - ios->oc->first_dev]; + unsigned dev = per_dev->dev - ios->oc->first_dev; + struct ore_dev *od = ios->oc->ods[dev]; - on_dev_error(ios, od, per_dev->dev, osi.osd_err_pri, + on_dev_error(ios, od, dev, osi.osd_err_pri, offset, residual); } if (osi.osd_err_pri >= acumulated_osd_err) { |